Skip to content

Commit

Permalink
rollback str_starts_with -> strpos
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuyaUchida committed Dec 18, 2024
1 parent c34dc4a commit b310e55
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/SqlQueryRowList.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use function count;
use function explode;
use function preg_replace;
use function str_starts_with;
use function strpos;
use function strtolower;
use function trim;
Expand Down Expand Up @@ -58,7 +57,7 @@ public function __invoke(array ...$queries): iterable
(string) preg_replace('/\/\*.*?\*\/|--.*$/m', '', (string) $result->queryString),
"\\ \t\n\r\0\x0B",
)) : '';
if ($result instanceof PDOStatement && str_starts_with($lastQuery, 'select')) {
if ($result instanceof PDOStatement && strpos($lastQuery, 'select') === 0) {
return (array) $result->fetchAll(PDO::FETCH_ASSOC);
}

Expand Down

0 comments on commit b310e55

Please sign in to comment.