From 0c9b4dc173c9bc52acbde975cfba0151aae5bb88 Mon Sep 17 00:00:00 2001 From: Kjartan Mannes <kjartan@2.no-reply.drupal.org> Date: Tue, 13 Nov 2001 10:46:36 +0000 Subject: [PATCH] - changed the PEAR version of db_query() to act similar to the MySQL one. If there is an SQL error db_query() will not return a result. --- includes/database.pear.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/database.pear.inc b/includes/database.pear.inc index 7f3da1a0021b..c0aeb9b7e227 100644 --- a/includes/database.pear.inc +++ b/includes/database.pear.inc @@ -27,8 +27,9 @@ function db_query($query, $debug = 0) { if (DB::isError($result)) { watchdog("error", "database: ". $result->getMessage() ."\nquery: ". htmlspecialchars($query)); } - - return $result; + else { + return $result; + } } function db_fetch_object($result) { -- GitLab