From 541d8a1d27f068c2a95eb153fa88e76ce6f50371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Mon, 9 Mar 2015 21:33:28 +0100 Subject: [PATCH] Fixup error in binary operations. --- lib/classes/databox/status.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/classes/databox/status.php b/lib/classes/databox/status.php index 7359effd21..b92492ec4a 100644 --- a/lib/classes/databox/status.php +++ b/lib/classes/databox/status.php @@ -192,7 +192,7 @@ class databox_status $stat2 = self::hex2bin($app, substr($stat2, 2)); } $stat1 = str_pad($stat1, 32, '0', STR_PAD_LEFT); - $stat2 = str_pad($stat1, 32, '0', STR_PAD_LEFT); + $stat2 = str_pad($stat2, 32, '0', STR_PAD_LEFT); return decbin(bindec($stat1) & ~bindec($stat2)); } @@ -206,9 +206,9 @@ class databox_status $stat2 = self::hex2bin($app, substr($stat2, 2)); } $stat1 = str_pad($stat1, 32, '0', STR_PAD_LEFT); - $stat2 = str_pad($stat1, 32, '0', STR_PAD_LEFT); + $stat2 = str_pad($stat2, 32, '0', STR_PAD_LEFT); - return decbin(hexdec($stat1) | hexdec($stat2)); + return decbin(bindec($stat1) | bindec($stat2)); } public static function dec2bin(Application $app, $status)