From 32835b4d7c3a846f019082f7ebf782d6f3626714 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Sat, 22 Mar 2014 11:55:48 +0000 Subject: [PATCH] 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 --- dblayer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dblayer.php b/dblayer.php index d830d1f..d30bc91 100644 --- a/dblayer.php +++ b/dblayer.php @@ -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)