From b310e55ce8e90f2ee7dfab25ea03c6304a582172 Mon Sep 17 00:00:00 2001 From: KazuyaUchida Date: Wed, 18 Dec 2024 09:26:56 +0900 Subject: [PATCH] rollback str_starts_with -> strpos --- src/SqlQueryRowList.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/SqlQueryRowList.php b/src/SqlQueryRowList.php index db7f6b4..01f5579 100644 --- a/src/SqlQueryRowList.php +++ b/src/SqlQueryRowList.php @@ -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; @@ -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); }