If buglinks queries fail don't try to mysql_fetch_object() on the result
This commit is contained in:
@@ -245,17 +245,25 @@ function getNumberOfImages()
|
|||||||
/* Get the number of queued bug links in the database */
|
/* Get the number of queued bug links in the database */
|
||||||
function getNumberOfQueuedBugLinks()
|
function getNumberOfQueuedBugLinks()
|
||||||
{
|
{
|
||||||
$result = query_appdb("SELECT count(*) as num_buglinks FROM buglinks WHERE queued='true';");
|
$hResult = query_appdb("SELECT count(*) as num_buglinks FROM buglinks WHERE queued='true';");
|
||||||
$row = mysql_fetch_object($result);
|
if($hResult)
|
||||||
return $row->num_buglinks;
|
{
|
||||||
|
$row = mysql_fetch_object($hResult);
|
||||||
|
return $row->num_buglinks;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the number of bug links in the database */
|
/* Get the number of bug links in the database */
|
||||||
function getNumberOfBugLinks()
|
function getNumberOfBugLinks()
|
||||||
{
|
{
|
||||||
$result = query_appdb("SELECT count(*) as num_buglinks FROM buglinks;");
|
$hResult = query_appdb("SELECT count(*) as num_buglinks FROM buglinks;");
|
||||||
$row = mysql_fetch_object($result);
|
if($hResult)
|
||||||
return $row->num_buglinks;
|
{
|
||||||
|
$row = mysql_fetch_object($hResult);
|
||||||
|
return $row->num_buglinks;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function lookupVendorName($vendorId)
|
function lookupVendorName($vendorId)
|
||||||
|
|||||||
Reference in New Issue
Block a user