You are here: Re: [PHP] Wierd error « PHP « IT news, forums, messages
Re: [PHP] Wierd error

Posted by "Chris Boget" on 11/17/05 16:30

> 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация