From 9e78e21ffb754a3c31ec5c26834e4e906f0af9b0 Mon Sep 17 00:00:00 2001 From: Jannis Nikou Date: Thu, 2 May 2024 12:59:51 -0700 Subject: [PATCH] Update Database.php --- src/Database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Database.php b/src/Database.php index 95d24c8..9623a09 100644 --- a/src/Database.php +++ b/src/Database.php @@ -61,7 +61,7 @@ public function query(string $sql): array { $this->statement->execute(); - if (stripos($sql, 'SELECT') === 0) { + if (strtoupper(substr(ltrim($sql), 0, 6)) === "SELECT") { $this->result = $this->statement->fetchAll(\PDO::FETCH_OBJ); return $this->result; } else {