dblayeroo: if a parameter is not valid, do not use it!

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3570 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-05-03 19:42:17 +00:00
parent 3d57b69e4d
commit 7706e2da71

View File

@@ -1861,6 +1861,9 @@ class dblayeroo
if (! array_key_exists ($key, $this->fields))
$this->DBException (sprintf (
"Invalid field to setValues '%s' : not defined in table", $key));
if (! is_string ($val) && ! is_int ($val))
$this->DBException (sprintf (
"Invalid field to setValues '%s': not string and not integer", $key));
$tmpValues[$key] = $val;
$tmpType[md5 ("$key, $val")] = $this->fieldTypeLight ($key);
$this->debugLog ("setValues : Type for $key = ".