From 160d8e7a469b60b5b615bbb998b031a2e281f898 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Mon, 27 Apr 2015 20:39:38 +0000 Subject: [PATCH] dblayer : allow insert of integer data git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2082 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- dblayer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dblayer.php b/dblayer.php index 6a33624..5528b38 100644 --- a/dblayer.php +++ b/dblayer.php @@ -281,11 +281,11 @@ class dblayer extends PDO // Skipped the removed autoincrement keys continue; } - elseif (! is_string ($datas[$key])) + elseif (! is_string ($datas[$key]) && ! is_integer ($datas[$key])) { $errors[$key] = array ("error", sprintf ( dgettext("domframework", - "Errors in consistency : '%s' is not an string [is %s]"), + "Errors in consistency : '%s' is not an integer or a string [is %s]"), $key, gettype ($datas[$key]))); continue; }