Commit 4a7313be authored by Patrick Louys's avatar Patrick Louys Committed by Marco Pivetta

changed return null to return false in mysqli driver if nothing was found

parent 11e10c49
...@@ -242,7 +242,7 @@ class MysqliStatement implements \IteratorAggregate, Statement ...@@ -242,7 +242,7 @@ class MysqliStatement implements \IteratorAggregate, Statement
{ {
$values = $this->_fetch(); $values = $this->_fetch();
if (null === $values) { if (null === $values) {
return null; return false;
} }
if (false === $values) { if (false === $values) {
...@@ -282,7 +282,7 @@ class MysqliStatement implements \IteratorAggregate, Statement ...@@ -282,7 +282,7 @@ class MysqliStatement implements \IteratorAggregate, Statement
$rows[] = $row; $rows[] = $row;
} }
} else { } else {
while (($row = $this->fetch($fetchMode)) !== null) { while (($row = $this->fetch($fetchMode)) !== false) {
$rows[] = $row; $rows[] = $row;
} }
} }
...@@ -296,7 +296,7 @@ class MysqliStatement implements \IteratorAggregate, Statement ...@@ -296,7 +296,7 @@ class MysqliStatement implements \IteratorAggregate, Statement
public function fetchColumn($columnIndex = 0) public function fetchColumn($columnIndex = 0)
{ {
$row = $this->fetch(PDO::FETCH_NUM); $row = $this->fetch(PDO::FETCH_NUM);
if (null === $row) { if (false === $row) {
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment