Fixes tag replacement in wcf\system\MetaTagHandler
authorNetzwergX <sebastian.teumert@gmx.de>
Fri, 5 Apr 2013 22:40:32 +0000 (00:40 +0200)
committerNetzwergX <sebastian.teumert@gmx.de>
Fri, 5 Apr 2013 22:40:32 +0000 (00:40 +0200)
wcfsetup/install/files/lib/system/MetaTagHandler.class.php

index 058a3f4b5ec1263164e3e154a828472e9087ab3b..4375a4a9f709d51dffb29a39ff6a1bac3b80acbd 100644 (file)
@@ -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]);
        }
 }
+