* 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
This commit is contained in:
@@ -2515,10 +2515,12 @@ class dblayeroo
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (in_array ("not null", $params) &&
|
if (in_array ("not null", $params) &&
|
||||||
|
! in_array ("autoincrement", $params) &&
|
||||||
$values[$field] === null)
|
$values[$field] === null)
|
||||||
{
|
{
|
||||||
$errors[$field] = sprintf (dgettext ("domframework",
|
$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;
|
continue;
|
||||||
}
|
}
|
||||||
if (! is_string ($values[$field]) && ! is_integer ($values[$field]) &&
|
if (! is_string ($values[$field]) && ! is_integer ($values[$field]) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user