diff options
Diffstat (limited to 'src/Utils')
-rw-r--r-- | src/Utils/Query.php | 2 | ||||
-rw-r--r-- | src/Utils/Table.php | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/Utils/Query.php b/src/Utils/Query.php index 11a08d0..f741620 100644 --- a/src/Utils/Query.php +++ b/src/Utils/Query.php @@ -531,7 +531,7 @@ class Query if ($onlyType) { return static::getClause($statement, $list, $old, -1, false) . ' ' . - $new . ' ' . static::getCLause($statement, $list, $old, 0) . ' ' . + $new . ' ' . static::getClause($statement, $list, $old, 0) . ' ' . static::getClause($statement, $list, $old, 1, false); } diff --git a/src/Utils/Table.php b/src/Utils/Table.php index 86ccbfb..ba7f82f 100644 --- a/src/Utils/Table.php +++ b/src/Utils/Table.php @@ -36,7 +36,10 @@ class Table */ public static function getForeignKeys($statement) { - if ((empty($statement->fields)) || (!$statement->options->has('TABLE'))) { + if ((empty($statement->fields)) + || (!is_array($statement->fields)) + || (!$statement->options->has('TABLE')) + ) { return array(); } @@ -85,7 +88,10 @@ class Table */ public static function getFields($statement) { - if ((empty($statement->fields)) || (!$statement->options->has('TABLE'))) { + if ((empty($statement->fields)) + || (!is_array($statement->fields)) + || (!$statement->options->has('TABLE')) + ) { return array(); } |