변수 충돌 부분 수정

This commit is contained in:
conory 2016-03-03 12:32:31 +09:00
parent b9a8b15fe9
commit 6a351265ff

View file

@ -219,14 +219,14 @@ class Lang
// Separate the plugin name from the key. // Separate the plugin name from the key.
if (preg_match('/^[a-z0-9_.-]+$/i', $key) && ($keys = explode('.', $key, 2)) && count($keys) === 2) if (preg_match('/^[a-z0-9_.-]+$/i', $key) && ($keys = explode('.', $key, 2)) && count($keys) === 2)
{ {
list($plugin_name, $key) = $keys; list($plugin_name, $lang_key) = $keys;
if (!isset($this->_loaded_plugins[$plugin_name])) if (!isset($this->_loaded_plugins[$plugin_name]))
{ {
$this->loadPlugin($plugin_name); $this->loadPlugin($plugin_name);
} }
if (isset($this->_loaded_plugins[$plugin_name]->{$key})) if (isset($this->_loaded_plugins[$plugin_name]->{$lang_key}))
{ {
return $this->_loaded_plugins[$plugin_name]->{$key}; return $this->_loaded_plugins[$plugin_name]->{$lang_key};
} }
goto end_other_lang; goto end_other_lang;