Re: Wierd error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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();

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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux