From 7e439ab52efb54621ca7fade65480f6d7b4a5310 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 26 Jul 2011 22:56:51 -0500 Subject: [PATCH] fixed bug in config has method. --- system/config.php | 7 +++++-- system/db/query.php | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/system/config.php b/system/config.php index 5cc0d30f..e1727da9 100644 --- a/system/config.php +++ b/system/config.php @@ -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 @@ class Config { $config = array_merge($config, require $path); } - return static::$items[$file] = $config; + if (count($config) > 0) + { + static::$items[$file] = $config; + } } } \ No newline at end of file diff --git a/system/db/query.php b/system/db/query.php index c4383d52..5260f9a8 100644 --- a/system/db/query.php +++ b/system/db/query.php @@ -413,7 +413,6 @@ class Query { */ public function first($columns = array('*')) { - return (count($results = $this->take(1)->get($columns)) > 0) ? $results[0] : null; }