Commit 39f6e001 by Qiang Xue

Fixed matching all case.

parent 67e9e661
......@@ -113,7 +113,7 @@ class I18N extends Component
} else {
// try wildcard matching
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;
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