From ed520fe9df5b0f253f02351d4b96342b19f2687b Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 11 Mar 2008 00:39:44 +0000 Subject: [PATCH] fixed PHP notices git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50831 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/i18n.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/i18n.php b/core/i18n.php index adcb3339f..0147b2142 100755 --- a/core/i18n.php +++ b/core/i18n.php @@ -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; }