diff options
Diffstat (limited to 'src/Utils/Table.php')
-rw-r--r-- | src/Utils/Table.php | 10 |
1 files changed, 8 insertions, 2 deletions
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(); } |