Skip to content

Commit

Permalink
Fix the returning of arrays in getAll methods when no data was fetched.
Browse files Browse the repository at this point in the history
  • Loading branch information
npicado committed Nov 21, 2018
1 parent 8776709 commit 00d3441
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Relational/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ public function fetchAllAsColumn(string $column, string $index_by = null)
$this->pdoStatement->closeCursor();

if ($this->pdoStatement->errorCode() === '00000') {
return null;
return [];
}

return false;
Expand Down Expand Up @@ -570,7 +570,7 @@ public function fetchAllAsArray(string $index_by = null, string $group_by = null
$this->pdoStatement->closeCursor();

if ($this->pdoStatement->errorCode() === '00000') {
return null;
return [];
}

return false;
Expand Down Expand Up @@ -712,7 +712,7 @@ public function fetchAllAsObject(
$this->pdoStatement->closeCursor();

if ($this->pdoStatement->errorCode() === '00000') {
return null;
return [];
}

return false;
Expand Down

0 comments on commit 00d3441

Please sign in to comment.