From 5e28cd08b442461968dadc6a1b9abe2d767f0cc8 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 8 Aug 2011 08:48:44 -0500 Subject: [PATCH] Refactoring the config class. --- system/config.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/system/config.php b/system/config.php index 0f8912e8..459b1e6f 100644 --- a/system/config.php +++ b/system/config.php @@ -79,9 +79,7 @@ class Config { if ($module !== 'application') $key = substr($key, strpos($key, ':') + 2); - $segments = explode('.', $key); - - $key = (count($segments) > 1) ? implode('.', array_slice($segments, 1)) : null; + $key = (count($segments = explode('.', $key)) > 1) ? implode('.', array_slice($segments, 1)) : null; return array($module, $segments[0], $key); }