From: Davide Franco Date: Fri, 8 Jul 2011 17:59:23 +0000 (+0200) Subject: bacula-web: Improved exception handler when no result in countJobs() function X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=15c7bc921f0e2bb90cef81a8a9c1d568c8261aae;p=bacula%2Fbacula bacula-web: Improved exception handler when no result in countJobs() function - return value is 0 instead of null --- diff --git a/gui/bacula-web/includes/bweb.inc.php b/gui/bacula-web/includes/bweb.inc.php index 17be84d6bc..4869f39cad 100644 --- a/gui/bacula-web/includes/bweb.inc.php +++ b/gui/bacula-web/includes/bweb.inc.php @@ -411,7 +411,11 @@ class Bweb extends DB $this->TriggerDBError( 'Unable to get last' . $type . 'jobs status from catalog', $res); }else { $result = $res->fetchRow(); - return array( $label, $result['count'] ); + + if( isset($result['count']) and !empty($result['count']) ) + return $result['count']; + else + return 0; } } // end function GetJobsStatistics()