Merged revisions 50838 via svnmerge from

http://svn.silverstripe.com/open/modules/sapphire/trunk

........
  r50838 | ischommer | 2008-03-11 13:39:44 +1300 (Tue, 11 Mar 2008) | 1 line
  
  fixed PHP notices
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.2.2@50832 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-03-11 00:39:59 +00:00 committed by Sam Minnee
parent f70dfdcbaa
commit c1fc0bcaaa

View File

@ -938,10 +938,12 @@ class i18n extends Controller {
} else {
global $_CLASS_MANIFEST;
if(strpos($name,'_') !== false) $name = strtok($name,'_');
$path = str_replace('\\','/',Director::makeRelative($_CLASS_MANIFEST[$name]));
ereg('/([^/]+)/', $path, $module);
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;
}