mirror of
https://github.com/cytopia/devilbox.git
synced 2025-04-09 03:54:16 +00:00
REL-0.9 Error checking in case some containers are not running
This commit is contained in:
parent
07145d40ba
commit
d9a255ae6a
@ -188,7 +188,10 @@ class Memcd extends _Base implements _iBase
|
||||
|
||||
public function getInfo()
|
||||
{
|
||||
$stats = $this->_memcached->getStats();
|
||||
$stats = array();
|
||||
if ($this->_memcached) {
|
||||
$stats = $this->_memcached->getStats();
|
||||
}
|
||||
return $stats;
|
||||
|
||||
}
|
||||
@ -207,12 +210,17 @@ class Memcd extends _Base implements _iBase
|
||||
|
||||
public function getVersion()
|
||||
{
|
||||
$info = $this->_memcached->getVersion();
|
||||
$info = array_values($info);
|
||||
if (!isset($info[0])) {
|
||||
loadClass('Logger')->error('Could not get Memcached version');
|
||||
return '';
|
||||
$version = '';
|
||||
if ($this->_memcached) {
|
||||
$info = $this->_memcached->getVersion();
|
||||
$info = array_values($info);
|
||||
if (!isset($info[0])) {
|
||||
loadClass('Logger')->error('Could not get Memcached version');
|
||||
} else {
|
||||
$version = $info[0];
|
||||
}
|
||||
}
|
||||
return $info[0];
|
||||
|
||||
return $version;
|
||||
}
|
||||
}
|
||||
|
@ -252,7 +252,11 @@ class Mysql extends _Base implements _iBase
|
||||
$data[$key] = $val;
|
||||
};
|
||||
|
||||
return $this->select('SHOW VARIABLES;', $callback);
|
||||
$config = $this->select('SHOW VARIABLES;', $callback);
|
||||
if (!$config) {
|
||||
$config = array();
|
||||
}
|
||||
return $config;
|
||||
|
||||
} else { // Get single config
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user