dblayer : don't allow anything than strings. Null parameters are skipped
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2059 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -274,8 +274,14 @@ class dblayer extends PDO
|
|||||||
//." ". dgettext("domframework","in")." ".$key);
|
//." ". dgettext("domframework","in")." ".$key);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for type inconsistencies if the value is provided
|
// Check for type inconsistencies if the value is provided
|
||||||
if (! is_string ($datas[$key]))
|
if (is_null ($datas[$key]))
|
||||||
|
{
|
||||||
|
// Skipped the removed autoincrement keys
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
elseif (! is_string ($datas[$key]))
|
||||||
{
|
{
|
||||||
$errors[$key] = array ("error", sprintf (
|
$errors[$key] = array ("error", sprintf (
|
||||||
dgettext("domframework",
|
dgettext("domframework",
|
||||||
@@ -449,7 +455,6 @@ class dblayer extends PDO
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->debug = 1;
|
|
||||||
// Check if the foreign keys constrains are valid before doing the insertion
|
// Check if the foreign keys constrains are valid before doing the insertion
|
||||||
foreach ($this->foreign as $foreign=>$data)
|
foreach ($this->foreign as $foreign=>$data)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user