From 1abb96159b86c0cc83b76de7759a5ee34584aa57 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 24 Mar 2011 14:27:11 +0000 Subject: [PATCH] PDO returns 'false' for no rows, but various parts of the code expect it to return 'null'; for now, emulate the old behaviour --- core/database.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/database.class.php b/core/database.class.php index 9b2c70c3..e3ed4105 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -359,7 +359,8 @@ class Database { * Execute an SQL query and return a single row */ public function get_row($query, $args=array()) { - return $this->execute($query, $args)->fetch(); + $row = $this->execute($query, $args)->fetch(); + return $row ? $row : null; } /**