diff --git a/phpstan-baseline.php b/phpstan-baseline.php index 2e8f42656230..cacc6fbda694 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -2518,7 +2518,7 @@ $ignoreErrors[] = [ // identifier: empty.notAllowed 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', - 'count' => 13, + 'count' => 12, 'path' => __DIR__ . '/system/Database/Forge.php', ]; $ignoreErrors[] = [ diff --git a/system/Database/Forge.php b/system/Database/Forge.php index 735303614b51..06044f72b58e 100644 --- a/system/Database/Forge.php +++ b/system/Database/Forge.php @@ -573,7 +573,7 @@ public function createTable(string $table, bool $ifNotExists = false, array $att } // Most databases don't support creating indexes from within the CREATE TABLE statement - if (! empty($this->keys)) { + if ($this->keys !== []) { for ($i = 0, $sqls = $this->_processIndexes($table), $c = count($sqls); $i < $c; $i++) { $this->db->query($sqls[$i]); }