Check for valid result resource before number of rows. objectGetEntries() may return FALSE if

the user does not have permission to view a queue, for instance.
This commit is contained in:
Alexander Nicolaysen Sørnes
2007-07-02 00:50:32 +00:00
committed by WineHQ
parent 62bfb16016
commit e93f09b0ad

View File

@@ -101,7 +101,7 @@ class ObjectManager
$hResult = $oObject->objectGetEntries($this->bIsQueue, $this->bIsRejected);
/* did we get any entries? */
if(mysql_num_rows($hResult) == 0)
if(!$hResult || mysql_num_rows($hResult) == 0)
{
switch($this->getQueueString($this->bIsQueue, $this->bIsRejected))
{