From 5085627b1d113abded3740f29a33a3509339a80c Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Mon, 22 Sep 2014 11:18:35 +0000 Subject: [PATCH] dblayer : be OK if the error of dblayer is an array or a string git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1843 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- dblayer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dblayer.php b/dblayer.php index 655f683..53425e2 100644 --- a/dblayer.php +++ b/dblayer.php @@ -717,6 +717,8 @@ class dblayer extends PDO $errors = $this->verify ($datas, $updatekey); if (count ($errors) !== 0) { + if (is_array ($errors)) + throw new Exception ($errors[0][1], 405); throw new Exception ($errors[1], 405); } foreach ($this->fields as $field=>$desc)