mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-02 11:48:08 +08:00
Update Translator.php
This commit is contained in:
parent
9c885f49bf
commit
8514a502d1
@ -267,16 +267,15 @@ class Translator implements TranslatorInterface
|
||||
$parsed = $this->parseNamespacedSegments($key);
|
||||
}
|
||||
|
||||
if (is_null($parsed[0])) {
|
||||
$parsed[0] = '*';
|
||||
}
|
||||
|
||||
// Once we have the parsed array of this key's elements, such as its groups
|
||||
// and namespace, we will cache each array inside a simple list that has
|
||||
// the key and the parsed array for quick look-ups for later requests.
|
||||
$segments = $this->parsed[$key] = $parsed;
|
||||
|
||||
if (is_null($segments[0])) {
|
||||
$segments[0] = '*';
|
||||
}
|
||||
|
||||
return $segments;
|
||||
return $this->parsed[$key] = $parsed;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user