diff --git a/system/lang.php b/system/lang.php index 7a0b177e..c20e3ec1 100644 --- a/system/lang.php +++ b/system/lang.php @@ -61,7 +61,7 @@ public static function line($key, $replacements = array()) * @param mixed $default * @return string */ - public function get($language = null, $default = null) + public function get($language = null, $default = '') { if (is_null($language)) { @@ -72,12 +72,7 @@ public function get($language = null, $default = null) $this->load($file, $language); - if ( ! isset(static::$lines[$language.$file][$line])) - { - return is_callable($default) ? call_user_func($default) : $default; - } - - $line = static::$lines[$language.$file][$line]; + $line = Arr::get(static::$lines[$language.$file], $line, $default); foreach ($this->replacements as $key => $value) {