From e56e19215f779dcf10b9e75bbd2e662428eda32f Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Tue, 1 Aug 2017 13:39:37 +0000 Subject: [PATCH] * dblayeroo: insert/update null are checked against the "NOT NULL" definition except for autoincrement key, which is allowed git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3857 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- dblayeroo.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dblayeroo.php b/dblayeroo.php index d7755ea..5f880d4 100644 --- a/dblayeroo.php +++ b/dblayeroo.php @@ -2515,10 +2515,12 @@ class dblayeroo continue; } if (in_array ("not null", $params) && + ! in_array ("autoincrement", $params) && $values[$field] === null) { $errors[$field] = sprintf (dgettext ("domframework", - "Field '%s' null and defined as not null")); + "Field '%s' null and defined as NOT NULL and ". + "not Autoincrement"), $field); continue; } if (! is_string ($values[$field]) && ! is_integer ($values[$field]) &&