From ff5466b2501d40b241863654f683c69f7d157b85 Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Thu, 7 Jul 2011 23:53:03 +0200 Subject: [PATCH] bacula-web: Handled exception when no result in job bytes graph --- gui/bacula-web/includes/bweb.inc.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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); } -- 2.39.5