dblayer : if the verify return an array with the field in key, the exception of update is now working

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2275 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2015-09-12 15:04:49 +00:00
parent 56f7a1a0f0
commit 800411803c

View File

@@ -831,7 +831,12 @@ class dblayer
if (count ($errors) !== 0)
{
if (is_array ($errors))
throw new Exception ($errors[0][1], 405);
{
if (isset ($errors[0][1]))
throw new Exception ($errors[0][1], 405);
$err = reset ($errors);
throw new Exception ($err[1], 405);
}
throw new Exception ($errors[1], 405);
}
foreach ($this->fields as $field=>$desc)