From: Aryeh Gregor Date: Sun, 14 Jun 2009 20:13:17 +0000 (+0000) Subject: Use parentheses for bit* to be on the safe side X-Git-Tag: 1.31.0-rc.0~41380 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=2f42924f3617eede396d39219c91a203d4174071;p=lhc%2Fweb%2Fwiklou.git Use parentheses for bit* to be on the safe side Follow-up to r51815. --- 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)"; } /**