File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -973,11 +973,14 @@ function admin(&$out)
973973 if ($ this ->mode == 'chart ' ) {
974974 $ arrayDB = array_slice (array_reverse ($ responce ['LIST ' ]), 0 , 7 );
975975 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 ;
981984
982985 if (round ($ DBstat_PerSec ) == 0 ) {
983986 $ select = SQLSelect ("SHOW GLOBAL STATUS " );
You can’t perform that action at this time.
0 commit comments