"suppressed warning if ADORecordSet::fetchSingle() has nothing to fetch and docu"

This commit is contained in:
Ralf Becker 2008-03-13 10:59:57 +00:00
parent 3760ea8608
commit e7d9ca5532

View File

@ -3408,7 +3408,7 @@
/** /**
* PDO compatibility function: fetch the next row * PDO compatibility function: fetch the next row
* *
* @return string * @return array/boolean false if there's nothing to fetch
*/ */
function &fetch($fetchmode=null) function &fetch($fetchmode=null)
{ {
@ -3428,12 +3428,12 @@
/** /**
* PDO compatibility function: fetch the first column of the next row * 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() function fetchSingle()
{ {
$row = $this->FetchRow(); $row = $this->FetchRow();
return array_shift($row); return is_array($row) ? array_shift($row) : false;
} }
} // end class ADORecordSet } // end class ADORecordSet