aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2013-03-28 00:27:02 +0100
committerAndreas Fischer <bantu@phpbb.com>2013-03-28 00:28:51 +0100
commit4bd5f279dc98f036021c04172ecbb30c092de59f (patch)
treeec50b5294f531a23676180da215745505c0ed855
parente3a6935de6185bde189e53452fca024ef9474c1b (diff)
downloadforums-4bd5f279dc98f036021c04172ecbb30c092de59f.tar
forums-4bd5f279dc98f036021c04172ecbb30c092de59f.tar.gz
forums-4bd5f279dc98f036021c04172ecbb30c092de59f.tar.bz2
forums-4bd5f279dc98f036021c04172ecbb30c092de59f.tar.xz
forums-4bd5f279dc98f036021c04172ecbb30c092de59f.zip
[ticket/11469] Add comment about using bitwise operator.
PHPBB3-11469
-rw-r--r--phpBB/includes/db/sql_insert_buffer.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/db/sql_insert_buffer.php b/phpBB/includes/db/sql_insert_buffer.php
index 46d397e7b4..c18f908429 100644
--- a/phpBB/includes/db/sql_insert_buffer.php
+++ b/phpBB/includes/db/sql_insert_buffer.php
@@ -118,11 +118,12 @@ class phpbb_db_sql_insert_buffer
*/
public function insert_all(array $rows)
{
- $result = false;
+ // Using bitwise |= because PHP does not have logical ||=
+ $result = 0;
foreach ($rows as $row)
{
- $result |= $this->insert($row);
+ $result |= (int) $this->insert($row);
}
return (bool) $result;