From e7d9ca5532814661ab2beb235c5acb96578821b8 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 13 Mar 2008 10:59:57 +0000 Subject: [PATCH] "suppressed warning if ADORecordSet::fetchSingle() has nothing to fetch and docu" --- phpgwapi/inc/adodb/adodb.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/adodb/adodb.inc.php b/phpgwapi/inc/adodb/adodb.inc.php index 37c00dc713..d7fecc76e6 100644 --- a/phpgwapi/inc/adodb/adodb.inc.php +++ b/phpgwapi/inc/adodb/adodb.inc.php @@ -3408,7 +3408,7 @@ /** * PDO compatibility function: fetch the next row * - * @return string + * @return array/boolean false if there's nothing to fetch */ function &fetch($fetchmode=null) { @@ -3428,12 +3428,12 @@ /** * PDO compatibility function: fetch the first column of the next row * - * @return string + * @return string/boolean false if there's nothing to fetch */ function fetchSingle() { $row = $this->FetchRow(); - return array_shift($row); + return is_array($row) ? array_shift($row) : false; } } // end class ADORecordSet