Re: Wierd error
| From: | Jochem Maas | Date: | Thu, 17 Nov 2005 15:32:07 +0000 |
| Subject: | Re: Wierd error | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-225982@lists.php.net to get a copy of this message | ||
Chris Boget wrote:
why not just do: unset($dbObject); ?I'm seeing the following line showing up in my logs: 08:08:30 [warning] [Unknown][0]: Unknown(): Unable to call () - function does not exist and I've narrowed it down to this line of code:Update, it turns out it's not the settype(). Here's a larger context of the offending area of code:$query = '<my query>';$queryResult =& $DBAccess->db->query( $query );if( !( DB::isError( $queryResult ))) { $tmpArray = array(); while( $queryResult->fetchInto( $tmpArray )) { $dbObject = new IPI_OfficeDetailsInterface(); $dbObject->_populateMemberVariables( $tmpArray ); $retval[] = $dbObject;$tmpArray = array(); settype( $dbObject, "null" );
}
}
The line to concentrate on is this one:
$dbObject = new IPI_OfficeDetailsInterface();
If I leave it as above, no error occurs. But I instead instantiate $dbObject
as follows (which is what I was doing originally)
$dbObject &= new IPI_OfficeDetailsInterface();
so you want to do a bitwise AND on a non-existant variable and a newly creately object??
maybe you meant to do:
$dbObject =& new IPI_OfficeDetailsInterface();
then the error shows up in the log again. The error only goes away if I either remove the settype() function call or I remove the '&' in the instantiation. Why? thnx, Chris