Skip to content

Commit ee10766

Browse files
committed
refactor: replace ! is_array() with is_string()
1 parent b8db96a commit ee10766

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

system/Database/Forge.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ public function renameTable(string $tableName, string $newTableName)
734734
public function addColumn(string $table, $fields): bool
735735
{
736736
// Work-around for literal column definitions
737-
if (! is_array($field)) {
737+
if (is_string($fields)) {
738738
$fields = [$fields];
739739
}
740740

@@ -792,7 +792,7 @@ public function dropColumn(string $table, $columnNames)
792792
public function modifyColumn(string $table, $fields): bool
793793
{
794794
// Work-around for literal column definitions
795-
if (! is_array($field)) {
795+
if (is_string($fields)) {
796796
$fields = [$fields];
797797
}
798798

0 commit comments

Comments
 (0)