BUGFIX: catch case of plugin not returning translations for the locale

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104847 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Mark Stephens 2010-05-13 23:59:05 +00:00 committed by Sam Minnee
parent 9f0c83ef88
commit 2eb9884ec9

View File

@ -1902,7 +1902,7 @@ class i18n extends Object {
*/
static function merge_locale_data($locale, $extra) {
global $lang;
if (!$extra || count($extra) == 0) return;
if (!$extra || count($extra) == 0 || !isset($extra[$locale])) return;
foreach ($extra[$locale] as $class => $entities) {
foreach ($entities as $entity => $translation) {
$lang[$locale][$class][$entity] = $translation;