From 7706e2da711c8f984802d889b0c023136bf4ed48 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 3 May 2017 19:42:17 +0000 Subject: [PATCH] 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 --- dblayeroo.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dblayeroo.php b/dblayeroo.php index 9be5aa5..efca24e 100644 --- a/dblayeroo.php +++ b/dblayeroo.php @@ -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 = ".