Add an exception to dblayer.php if the datas are not in the right format
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1230 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -64,6 +64,8 @@ class dblayer extends PDO
|
|||||||
{
|
{
|
||||||
if ($this->db === null)
|
if ($this->db === null)
|
||||||
throw new Exception ("Database not connected");
|
throw new Exception ("Database not connected");
|
||||||
|
if (!is_array ($datas))
|
||||||
|
throw new Exception ("The datas provided to create are not array");
|
||||||
$datasOK = array ();
|
$datasOK = array ();
|
||||||
// Check for missing parameters
|
// Check for missing parameters
|
||||||
foreach ($this->fields as $key=>$params)
|
foreach ($this->fields as $key=>$params)
|
||||||
|
|||||||
Reference in New Issue
Block a user