diff --git a/src/SqlQueryRowList.php b/src/SqlQueryRowList.php index c79bd7b..6c9c79d 100644 --- a/src/SqlQueryRowList.php +++ b/src/SqlQueryRowList.php @@ -55,7 +55,7 @@ public function __invoke(array ...$queries): iterable $lastQuery = $result ? strtolower(trim((string) $result->queryString, "\\ \t\n\r\0\x0B")) : ''; // Remove leading comment - $sqlQuery = trim(preg_replace('/^\/\*.*\*\//', '', $lastQuery)); + $sqlQuery = trim((string) preg_replace('/^\/\*.*\*\//', '', $lastQuery)); if ($result instanceof PDOStatement && strpos($sqlQuery, 'select') === 0) { return (array) $result->fetchAll(PDO::FETCH_ASSOC); }