diff --git a/opcache.php b/opcache.php index 22b4b2f..0e4c7f8 100644 --- a/opcache.php +++ b/opcache.php @@ -27,6 +27,9 @@ public function getPageTitle() public function getStatusDataRows() { $rows = array(); + if ( $this->_status === false ) { + return 'Opcache is disabled'; + } foreach ($this->_status as $key => $value) { if ($key === 'scripts') { continue; @@ -98,6 +101,9 @@ public function getConfigDataRows() public function getScriptStatusRows() { + if ( $this->_status === false ) { + return ''; + } foreach ($this->_status['scripts'] as $key => $data) { $dirs[dirname($key)][basename($key)] = $data; $this->_arrayPset($this->_d3Scripts, $key, array( @@ -150,6 +156,9 @@ public function getScriptStatusRows() public function getScriptStatusCount() { + if ( $this->_status === false ) { + return '0'; + } return count($this->_status["scripts"]); }