Added check that the table variable is actually set
This commit is contained in:
parent
ce61f797f3
commit
e05dd7c79e
2 changed files with 12 additions and 0 deletions
|
@ -293,6 +293,12 @@ class Model extends Object
|
|||
*/
|
||||
public function __construct($type_or_parameters = null, $parameters = null)
|
||||
{
|
||||
// Errors if a table is not set. You're welcome, Geoff.
|
||||
if ($this->table == false)
|
||||
{
|
||||
throw new Exception('You must set the table variable');
|
||||
}
|
||||
|
||||
// Runs the parent constructor so we have the config
|
||||
parent::__construct();
|
||||
|
||||
|
|
6
jar.php
6
jar.php
|
@ -4214,6 +4214,12 @@ class Model extends Object
|
|||
*/
|
||||
public function __construct($type_or_parameters = null, $parameters = null)
|
||||
{
|
||||
// Errors if a table is not set. You're welcome, Geoff.
|
||||
if ($this->table == false)
|
||||
{
|
||||
throw new Exception('You must set the table variable');
|
||||
}
|
||||
|
||||
// Runs the parent constructor so we have the config
|
||||
parent::__construct();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue