mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Support PHP 8 namespace tokens in i18nTextCollector
This commit is contained in:
parent
bad0662291
commit
44685eceba
@ -570,6 +570,13 @@ class i18nTextCollector
|
||||
if (is_array($token)) {
|
||||
list($id, $text) = $token;
|
||||
|
||||
// PHP 8 namespace tokens
|
||||
if (\defined('T_NAME_QUALIFIED') && in_array($id, [T_NAME_FULLY_QUALIFIED, T_NAME_QUALIFIED])) {
|
||||
$inNamespace = true;
|
||||
$currentClass[] = $text;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check class
|
||||
if ($id === T_NAMESPACE) {
|
||||
$inNamespace = true;
|
||||
|
Loading…
Reference in New Issue
Block a user