Browse Source

Use function is_object()

master
Vyacheslav Agafonov 13 years ago
parent
commit
fb127900e1
  1. 2
      model/Db.php
  2. 3
      redis/RedisManager.php

2
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;

3
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;

Loading…
Cancel
Save