ChangeSet ID: 31235 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner@winehq.org 2007/07/01 19:50:32
Modified files: include : objectManager.php
Log message: Alexander Nicolaysen Sørnes alex@thehandofagony.com 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.
Patch: http://cvs.winehq.org/patch.py?id=31235
Old revision New revision Changes Path 1.33 1.34 +1 -1 appdb/include/objectManager.php
Index: appdb/include/objectManager.php diff -u -p appdb/include/objectManager.php:1.33 appdb/include/objectManager.php:1.34 --- appdb/include/objectManager.php:1.33 2 Jul 2007 0:50:32 -0000 +++ appdb/include/objectManager.php 2 Jul 2007 0:50:32 -0000 @@ -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)) {