]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Handled exception when no result in job bytes graph
authorDavide Franco <bacula-dev@dflc.ch>
Thu, 7 Jul 2011 21:53:03 +0000 (23:53 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:20 +0000 (14:49 +0200)
gui/bacula-web/includes/bweb.inc.php

index 2bbcb70127847ebe67ef61ef881e222c49819dcb..0e94f135286a097f2a6370052b9222f504852f4d 100644 (file)
@@ -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);
                }