From fb127900e120556583fb8b1463225d7ee0d06a0d Mon Sep 17 00:00:00 2001 From: Vyacheslav Agafonov Date: Thu, 1 Dec 2011 19:36:04 +0400 Subject: [PATCH] Use function is_object() --- model/Db.php | 2 +- redis/RedisManager.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/model/Db.php b/model/Db.php index bbe8643..0eec589 100644 --- a/model/Db.php +++ b/model/Db.php @@ -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; diff --git a/redis/RedisManager.php b/redis/RedisManager.php index 31fd245..4a64f63 100644 --- a/redis/RedisManager.php +++ b/redis/RedisManager.php @@ -31,8 +31,7 @@ class RedisManager { if (!isset(self::$connections[$name])) { if (!$config) { - - if (gettype(Config::get('Redis')) != 'object') { + if (!is_object(Config::get('Redis'))) { throw new GeneralException('Redis config no existence'); } $config = Config::get('Redis')->$name;