diff options
Diffstat (limited to 'system/libraries/Database_Builder.php')
-rw-r--r-- | system/libraries/Database_Builder.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/system/libraries/Database_Builder.php b/system/libraries/Database_Builder.php index e86ce379..553ffd98 100644 --- a/system/libraries/Database_Builder.php +++ b/system/libraries/Database_Builder.php @@ -190,6 +190,8 @@ class Database_Builder_Core { { foreach ($columns as $column) { + if (count($column) != 3) + throw new Database_Exception('Column triplets require a column, op and value'); $this->where[] = array('AND' => $column); } } @@ -216,6 +218,8 @@ class Database_Builder_Core { { foreach ($columns as $column) { + if (count($column) != 3) + throw new Database_Exception('Column triplets require a column, op and value'); $this->where[] = array('OR' => $column); } } @@ -422,6 +426,8 @@ class Database_Builder_Core { { foreach ($columns as $column) { + if (count($column) != 3) + throw new Database_Exception('Column triplets require a column, op and value'); $this->having[] = array('AND' => $column); } } @@ -447,6 +453,8 @@ class Database_Builder_Core { { foreach ($columns as $column) { + if (count($column) != 3) + throw new Database_Exception('Column triplets require a column, op and value'); $this->having[] = array('OR' => $column); } } |