refactor: use compare empty array on Forge on keys property

This commit is contained in:
Abdul Malik Ikhsan 2024-11-12 09:12:54 +07:00
parent a9fa3d0bcf
commit c8b3804f7d
No known key found for this signature in database
GPG Key ID: 69AC5BC354C89BE6
2 changed files with 2 additions and 2 deletions

View File

@ -2518,7 +2518,7 @@ $ignoreErrors[] = [
$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[] = [

View File

@ -573,7 +573,7 @@ class Forge
}
// 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]);
}