From 821edf3f70210efd8513ccf2b840ca3117886625 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 4 Mar 2018 12:05:10 +0100 Subject: [PATCH] [repo.professor] prevent wrong statements to be executed --- build/database/repo/professor.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/database/repo/professor.php b/build/database/repo/professor.php index bcdec54..4adb6e0 100644 --- a/build/database/repo/professor.php +++ b/build/database/repo/professor.php @@ -180,6 +180,7 @@ class professor extends Repo_i { $st = $this->pdo->prepare("SELECT * FROM `Professeur`$cond GROUP BY abreviation ASC"); /* (3) Bind params and execute statement */ + if( is_bool($st) ) return []; $success = $st->execute($parm); /* (4) Manage error */ @@ -270,6 +271,8 @@ class professor extends Repo_i { Prof.idProfesseur;"); /* (3) Bind params and execute statement */ + if( is_bool($st) ) return []; + $success = $st->execute($parm); /* (4) Manage error */