diff --git a/dblayer.php b/dblayer.php index 85eeaea..a05b612 100644 --- a/dblayer.php +++ b/dblayer.php @@ -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)