From 4bd5f279dc98f036021c04172ecbb30c092de59f Mon Sep 17 00:00:00 2001 From: Andreas Fischer <bantu@phpbb.com> Date: Thu, 28 Mar 2013 00:27:02 +0100 Subject: [ticket/11469] Add comment about using bitwise operator. PHPBB3-11469 --- phpBB/includes/db/sql_insert_buffer.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'phpBB/includes') 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; -- cgit v1.2.1