From cf51241f34326178fbb5dd4f397c8a28bb487626 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Thu, 31 Jul 2014 12:00:56 +0000 Subject: [PATCH] BUG dblayer : if the foreign keys are not modified, we don't check if they are correct git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1617 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- dblayer.php | 4 ++++ 1 file changed, 4 insertions(+) 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` ".