Use function is_object()

This commit is contained in:
Vyacheslav Agafonov
2011-12-01 19:36:04 +04:00
parent 79c541aa78
commit fb127900e1
2 changed files with 2 additions and 3 deletions

View File

@ -36,7 +36,7 @@ class Db
{
if (!isset(self::$connections[$name])) {
if (!$config) {
if (gettype(Config::get(__CLASS__)) != 'object') {
if (!is_object(Config::get(__CLASS__))) {
throw new InitializationException('Trying to get property of non-object');
}
$config = Config::get(__CLASS__)->$name;