From daa5e601ea94aab69d53e9b354a097727fa8f36c Mon Sep 17 00:00:00 2001 From: Johan Pascal Date: Thu, 27 Jun 2019 15:49:57 +0700 Subject: [PATCH] Fix DB access cleaning --- src/mysqli-db.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mysqli-db.php b/src/mysqli-db.php index 8177d28..0633f9d 100644 --- a/src/mysqli-db.php +++ b/src/mysqli-db.php @@ -36,7 +36,9 @@ function linphonedb_fetch($result) { } function linphonedb_clean($result) { - mysqli_free_result($result); + if (!is_bool($result)) { // some query may return a boolean, in that case we must not call free + mysqli_free_result($result); + } } function linphonedb_close($conn) {