mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Fixed i18n:;get_owner_module(), broken by changed manifest returns (paths with leading slash)
This commit is contained in:
parent
e7a4eec0da
commit
98c2517b80
@ -1803,7 +1803,8 @@ class i18n extends Object implements TemplateGlobalProvider {
|
||||
$path = Director::makeRelative($path);
|
||||
$path = str_replace('\\', '/', $path);
|
||||
|
||||
return substr($path, 0, strpos($path, '/'));
|
||||
$parts = explode('/', trim($path, '/'));
|
||||
return array_shift($parts);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user