Commit 39f6e001 by Qiang Xue

Fixed matching all case.

parent 67e9e661
...@@ -113,7 +113,7 @@ class I18N extends Component ...@@ -113,7 +113,7 @@ class I18N extends Component
} else { } else {
// try wildcard matching // try wildcard matching
foreach ($this->translations as $pattern => $config) { foreach ($this->translations as $pattern => $config) {
if (substr($pattern, -1) === '*' && strpos($category, rtrim($pattern, '*')) === 0) { if ($pattern === '*' || substr($pattern, -1) === '*' && strpos($category, rtrim($pattern, '*')) === 0) {
$source = $config; $source = $config;
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment