dblayer : don't do the update if no data is provided

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2036 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2015-03-21 15:48:27 +00:00
parent 672111b07e
commit cb5f651247

View File

@@ -768,6 +768,9 @@ class dblayer extends PDO
throw new Exception (dgettext("domframework", "No Field defined"), 500);
if ($this->primary === null)
throw new Exception (dgettext("domframework", "No Primary defined"), 500);
if (count ($datas) === 0)
throw new Exception (dgettext("domframework",
"No data to update provided"), 500);
$datasOK = array ();
$errors = $this->verify ($datas, $updatekey);
if (count ($errors) !== 0)