fixed bug in config has method.
This commit is contained in:
parent
0f1bd8a739
commit
7e439ab52e
|
@ -7,7 +7,7 @@ class Config {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $items = array();
|
||||
public static $items = array();
|
||||
|
||||
/**
|
||||
* Determine if a configuration item or file exists.
|
||||
|
@ -112,7 +112,10 @@ public static function load($file)
|
|||
$config = array_merge($config, require $path);
|
||||
}
|
||||
|
||||
return static::$items[$file] = $config;
|
||||
if (count($config) > 0)
|
||||
{
|
||||
static::$items[$file] = $config;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -413,7 +413,6 @@ public function find($id, $columns = array('*'))
|
|||
*/
|
||||
public function first($columns = array('*'))
|
||||
{
|
||||
|
||||
return (count($results = $this->take(1)->get($columns)) > 0) ? $results[0] : null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue