Skip to content

Commit

Permalink
Version 3.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Jun 8, 2022
1 parent 03e7400 commit b8d12d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Version 3.0.2

* Guarantee that `EasyDB::row()` always returns an `array` instead of throwing
a `TypeError` when encountering `null`.
See also: [#144](https://github.com/paragonie/easydb/pull/144).

# Version 3.0.1

* [#143](https://github.com/paragonie/easydb/issues/143):
Expand Down
1 change: 1 addition & 0 deletions src/EasyDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,7 @@ public function row(string $statement, ...$params): array
if (is_array($result)) {
$first = array_shift($result);
if (!is_array($first)) {
/* Do not TypeError on empty results */
return [];
}
return $first;
Expand Down

0 comments on commit b8d12d4

Please sign in to comment.