dblayeroo: check if table name and primary key is defined before verify an entry
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3707 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -2299,6 +2299,11 @@ class dblayeroo
|
||||
{
|
||||
$update = !! $update;
|
||||
$errors = array ();
|
||||
if ($this->table === null)
|
||||
throw new \Exception ("No table name defined", 500);
|
||||
if ($this->primary === null)
|
||||
throw new \Exception ("No primary key defined for table '$this->table'",
|
||||
500);
|
||||
if ($update === false)
|
||||
{
|
||||
// INSERT mode
|
||||
|
||||
Reference in New Issue
Block a user