tweaked config and lang classes.

This commit is contained in:
Taylor Otwell
2011-08-02 20:20:17 -05:00
parent f087df9bb8
commit 3583bc3b09
3 changed files with 13 additions and 13 deletions

View File

@@ -61,7 +61,7 @@ class Lang {
* @param mixed $default
* @return string
*/
public function get($language = null, $default = '')
public function get($language = null, $default = null)
{
if (is_null($language))
{
@@ -72,7 +72,12 @@ class Lang {
$this->load($file, $language);
$line = Arr::get(static::$lines[$language.$file], $line, $default);
if ( ! isset(static::$lines[$language.$file][$line]))
{
return is_callable($default) ? call_user_func($default) : $default;
}
$line = static::$lines[$language.$file][$line];
foreach ($this->replacements as $key => $value)
{