From 83bd354198e387635af61c1d28eb4a69d4e14d09 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no>
Date: Tue, 12 Jan 2010 11:56:33 +0000
Subject: [PATCH] Fix for dictionary merging of translations...

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2101 44740490-163a-0410-bde0-09ae8108e29a
---
 lib/SimpleSAML/XHTML/Template.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php
index 94a0d131d..f0952f2dc 100644
--- a/lib/SimpleSAML/XHTML/Template.php
+++ b/lib/SimpleSAML/XHTML/Template.php
@@ -480,7 +480,8 @@ class SimpleSAML_XHTML_Template {
 	// Merge two translation arrays.
 	public static function lang_merge($def, $lang) {
 		foreach($def AS $key => $value) {
-			$def[$key] = array_merge($value, $lang[$key]);
+			if (array_key_exists($key, $lang))
+				$def[$key] = array_merge($value, $lang[$key]);
 		}
 		return $def;
 	}
-- 
GitLab