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:
2014-03-22 11:55:48 +00:00
parent 28a5d1b4ce
commit 32835b4d7c

View File

@@ -64,6 +64,8 @@ class dblayer extends PDO
{
if ($this->db === null)
throw new Exception ("Database not connected");
if (!is_array ($datas))
throw new Exception ("The datas provided to create are not array");
$datasOK = array ();
// Check for missing parameters
foreach ($this->fields as $key=>$params)