From: Davide Franco Date: Thu, 7 Jul 2011 21:53:03 +0000 (+0200) Subject: bacula-web: Handled exception when no result in job bytes graph X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ff5466b2501d40b241863654f683c69f7d157b85;p=bacula%2Fbacula bacula-web: Handled exception when no result in job bytes graph --- diff --git a/gui/bacula-web/includes/bweb.inc.php b/gui/bacula-web/includes/bweb.inc.php index 2bbcb70127..0e94f13528 100644 --- a/gui/bacula-web/includes/bweb.inc.php +++ b/gui/bacula-web/includes/bweb.inc.php @@ -610,9 +610,12 @@ class Bweb extends DB }else{ $result = $result->fetchRow(); - if( !PEAR::isError($result) ) - return $result['stored_bytes']; - else + if( !PEAR::isError($result) ) { + if( isset($result['stored_bytes']) and !empty($result['stored_bytes']) ) + return $result['stored_bytes']; + else + return 0; + }else $this->TriggerDBError( "Error fetching query result", $result); }