BUGFIX: catch case of plugin not returning translations for the locale (from r104847)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112399 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-10-15 01:16:31 +00:00
parent f22260487a
commit c0d0631c3b

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;