File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -973,11 +973,14 @@ function admin(&$out)
973
973
if ($ this ->mode == 'chart ' ) {
974
974
$ arrayDB = array_slice (array_reverse ($ responce ['LIST ' ]), 0 , 7 );
975
975
echo json_encode ($ arrayDB );
976
- } else if ($ this ->mode == 'showdbload ' && isset ($ GLOBALS ['db ' ]->dbh ->stat )) {
977
- $ DBstat = $ GLOBALS ['db ' ]->dbh ->stat ;
978
- $ DBstat = explode (' ' , $ DBstat );
979
- $ DBstat_PerSec = preg_replace ('/[^0-9.]/ ' , '' , $ DBstat [7 ]);
980
- $ DBstat_PerSecType = 'main ' ;
976
+ } else if ($ this ->mode == 'showdbload ' ) {
977
+ if (isset ($ GLOBALS ['db ' ]->dbh ->stat )) {
978
+ $ DBstat = $ GLOBALS ['db ' ]->dbh ->stat ;
979
+ $ DBstat = explode (' ' , $ DBstat );
980
+ $ DBstat_PerSec = preg_replace ('/[^0-9.]/ ' , '' , $ DBstat [7 ]);
981
+ $ DBstat_PerSecType = 'main ' ;
982
+ }
983
+ else $ DBstat_PerSec = 0 ;
981
984
982
985
if (round ($ DBstat_PerSec ) == 0 ) {
983
986
$ select = SQLSelect ("SHOW GLOBAL STATUS " );
You can’t perform that action at this time.
0 commit comments