Skip to content

Commit

Permalink
fix: return query result directly since it doesn't return false any…
Browse files Browse the repository at this point in the history
…more
  • Loading branch information
felix-schindler committed Nov 19, 2024
1 parent b841155 commit a2bbd94
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/core/data/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ public function fetchAll(): ?array
$this->execute();
}
if ($this->success) {
if (($result = $this->stmt->fetchAll(PDO::FETCH_ASSOC)) !== false) {
return $result;
}
return $this->stmt->fetchAll(PDO::FETCH_ASSOC);
}
return null;
}
Expand Down

0 comments on commit a2bbd94

Please sign in to comment.