From: NetzwergX Date: Fri, 5 Apr 2013 22:40:32 +0000 (+0200) Subject: Fixes tag replacement in wcf\system\MetaTagHandler X-Git-Tag: 2.0.0_Beta_1~390^2~5^2^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a63af0ee8c5815ac1f2b3ed935826f19ea993585;p=GitHub%2FWoltLab%2FWCF.git Fixes tag replacement in wcf\system\MetaTagHandler --- 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]); } } +