From a63af0ee8c5815ac1f2b3ed935826f19ea993585 Mon Sep 17 00:00:00 2001 From: NetzwergX Date: Sat, 6 Apr 2013 00:40:32 +0200 Subject: [PATCH] Fixes tag replacement in wcf\system\MetaTagHandler --- .../install/files/lib/system/MetaTagHandler.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/MetaTagHandler.class.php b/wcfsetup/install/files/lib/system/MetaTagHandler.class.php index 058a3f4b5e..4375a4a9f7 100644 --- a/wcfsetup/install/files/lib/system/MetaTagHandler.class.php +++ b/wcfsetup/install/files/lib/system/MetaTagHandler.class.php @@ -62,6 +62,10 @@ class MetaTagHandler extends SingletonFactory implements \Countable, \Iterator { $value = StringUtil::encodeHTML($value); } + if (!isset($this->objects[$identifier])) { + $this->indexToObject[] = $identifier; + } + $this->objects[$identifier] = array( 'isProperty' => $isProperty, 'name' => $name, @@ -71,9 +75,7 @@ class MetaTagHandler extends SingletonFactory implements \Countable, \Iterator { // replace description if Open Graph Protocol tag was given if ($name == 'og:description') { $this->objects['description']['value'] = $value; - } - - $this->indexToObject[] = $identifier; + } } /** @@ -136,3 +138,4 @@ class MetaTagHandler extends SingletonFactory implements \Countable, \Iterator { return isset($this->indexToObject[$this->index]); } } + -- 2.20.1