diff --git a/dblayer.php b/dblayer.php index 0b50512..6a33624 100644 --- a/dblayer.php +++ b/dblayer.php @@ -274,8 +274,14 @@ class dblayer extends PDO //." ". dgettext("domframework","in")." ".$key); continue; } + // 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 ( 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 foreach ($this->foreign as $foreign=>$data) {