diff --git a/dblayer.php b/dblayer.php index ddb5b34..6c27471 100644 --- a/dblayer.php +++ b/dblayer.php @@ -482,6 +482,10 @@ class dblayer extends PDO // Check if the foreign keys constrains are valid before doing the update foreach ($this->foreign as $foreign=>$data) { + // If the foreign keys are not modified, we don't check if they are + // correct + if (!isset ($datasOK[$foreign])) + continue; $table = $data[0]; $column = $data[1]; $req = "SELECT $column FROM `$this->tableprefix$table` ".