mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/11469] Add comment about using bitwise operator.
PHPBB3-11469
This commit is contained in:
parent
e3a6935de6
commit
4bd5f279dc
1 changed files with 3 additions and 2 deletions
|
@ -118,11 +118,12 @@ class phpbb_db_sql_insert_buffer
|
||||||
*/
|
*/
|
||||||
public function insert_all(array $rows)
|
public function insert_all(array $rows)
|
||||||
{
|
{
|
||||||
$result = false;
|
// Using bitwise |= because PHP does not have logical ||=
|
||||||
|
$result = 0;
|
||||||
|
|
||||||
foreach ($rows as $row)
|
foreach ($rows as $row)
|
||||||
{
|
{
|
||||||
$result |= $this->insert($row);
|
$result |= (int) $this->insert($row);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (bool) $result;
|
return (bool) $result;
|
||||||
|
|
Loading…
Add table
Reference in a new issue