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:
2017-05-19 17:55:07 +00:00
parent 50e01cc20b
commit bb37b9200a

View File

@@ -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