mirror of
https://github.com/cytopia/devilbox.git
synced 2025-06-04 08:30:56 +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()
|
public function getInfo()
|
||||||
{
|
{
|
||||||
$stats = $this->_memcached->getStats();
|
$stats = array();
|
||||||
|
if ($this->_memcached) {
|
||||||
|
$stats = $this->_memcached->getStats();
|
||||||
|
}
|
||||||
return $stats;
|
return $stats;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -207,12 +210,17 @@ class Memcd extends _Base implements _iBase
|
|||||||
|
|
||||||
public function getVersion()
|
public function getVersion()
|
||||||
{
|
{
|
||||||
$info = $this->_memcached->getVersion();
|
$version = '';
|
||||||
$info = array_values($info);
|
if ($this->_memcached) {
|
||||||
if (!isset($info[0])) {
|
$info = $this->_memcached->getVersion();
|
||||||
loadClass('Logger')->error('Could not get Memcached version');
|
$info = array_values($info);
|
||||||
return '';
|
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;
|
$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
|
} else { // Get single config
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user