mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
fixed PHP notices
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50831 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
bba9bb623e
commit
ed520fe9df
@ -938,10 +938,12 @@ class i18n extends Controller {
|
||||
} else {
|
||||
global $_CLASS_MANIFEST;
|
||||
if(strpos($name,'_') !== false) $name = strtok($name,'_');
|
||||
if(isset($_CLASS_MANIFEST[$name])) {
|
||||
$path = str_replace('\\','/',Director::makeRelative($_CLASS_MANIFEST[$name]));
|
||||
ereg('/([^/]+)/', $path, $module);
|
||||
}
|
||||
return ($module) ? $module[1] : false;
|
||||
}
|
||||
return (isset($module)) ? $module[1] : false;
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user