From 2f42924f3617eede396d39219c91a203d4174071 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Sun, 14 Jun 2009 20:13:17 +0000 Subject: [PATCH] Use parentheses for bit* to be on the safe side Follow-up to r51815. --- includes/db/Database.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/db/Database.php b/includes/db/Database.php index fe31766c9e..4c151d7a1c 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1445,15 +1445,15 @@ abstract class DatabaseBase { */ function bitNot($field) { - return '~'.$bitField; + return "(~$bitField)"; } function bitAnd($fieldLeft, $fieldRight) { - return $fieldLeft.'&'.$fieldRight; + return "($fieldLeft & $fieldRight)"; } function bitOr($fieldLeft, $fieldRight) { - return $fieldLeft.'|'.$fieldRight; + return "($fieldLeft | $fieldRight)"; } /** -- 2.20.1