Commit 8140eca9 authored by Patrick Louys's avatar Patrick Louys

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

parent b75cc857
...@@ -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) {
...@@ -292,7 +292,7 @@ class MysqliStatement implements \IteratorAggregate, Statement ...@@ -292,7 +292,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;
} }
} }
...@@ -306,7 +306,7 @@ class MysqliStatement implements \IteratorAggregate, Statement ...@@ -306,7 +306,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