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 {