WoltLab/WCF — pull request #1201 by NetzwergX (2013-04-05 22:47:28+00:00)
Title: Fixes tag replacement in wcf\system\MetaTagHandler

cf. #1198

If you try to replace a tag, a new index is added to the indexToObject array, which later returns the same tag (same identifier!) twice during iteration.

Test case:

addTag('description', 'description', 'fuuu!');

foreach($tagHandler as $tag)
echo $tag.PHP_EOL;

Output:

+++

It should be clear, that if you replace the tag with the same identifier, it should not be displayed twice. The proposed pull request fixes the issue by only creating a new index in the indexToObject array, if and only if the identifier was not used before.