mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
refactor: use compare empty array on Forge on keys property
This commit is contained in:
parent
a9fa3d0bcf
commit
c8b3804f7d
@ -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[] = [
|
||||
|
@ -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]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user