note 59749 added to functions.returning-values

From: Date: Wed, 14 Dec 2005 22:06:15 +0000
Subject: note 59749 added to functions.returning-values
Groups: php.notes 
Request: Send a blank email to php-notes+get-100161@lists.php.net to get a copy of this message
I cannot figure out why I am getting an error when I try to return the variable reference "$false" in this function. Here is the code: function &FetchRow() { if ($this->EOF) { $false = false; return $false; //line 2797 } $arr = $this->fields; $this->_currentRow++; if (!$this->_fetch()) $this->EOF = true; return $arr; } Here is the error in the file that this code belongs: Notice: Only variable references should be returned by reference in /home/iecrccom/public_html/mirrormed/cellini/lib/adodb/adodb.inc.php on line 2797 Please help. Sharaaz ---- Manual Page -- http://www.php.net/manual/en/functions.returning-values.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+59749 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59749&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59749&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59749&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59749&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59749&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59749&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59749&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+59749&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#100161) next »