From e2973e565d8b1b72ad77a0a803b629cb9ed009a7 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 6 Jul 2011 14:37:59 -0700 Subject: [PATCH] Allow closures as Config default. --- system/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/config.php b/system/config.php index 4c67e90b..175e370a 100644 --- a/system/config.php +++ b/system/config.php @@ -44,7 +44,7 @@ class Config { // Verify that the configuration file actually exists. if ( ! array_key_exists($file, static::$items)) { - return $default; + return is_callable($default) ? call_user_func($default) : $default; } return Arr::get(static::$items[$file], $key, $default);