Skip to content
Snippets Groups Projects
Commit 5a1e80cb authored by Georg Ringer's avatar Georg Ringer
Browse files

[BUGFIX] Unify MetaTagApi removal methods

Add strtolower calls at `GenericMetaTagManager::removeProperty` to be in
sync with `PageRenderer::removeMetaTag`.

Resolves: #100198
Releases: main, 11.5
Change-Id: If758375d3293cbcd8897891a866c6cf6fb6df508
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78064


Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarcore-ci <typo3@b13.com>
parent d68dd01d
Branches
Tags
No related merge requests found
......@@ -143,6 +143,9 @@ final class GenericMetaTagManager implements MetaTagManagerInterface
*/
public function removeProperty(string $property, string $type = '')
{
$property = strtolower($property);
$type = strtolower($type);
if (!empty($type)) {
unset($this->properties[$property][$type]);
} else {
......
......@@ -146,7 +146,7 @@ class GenericMetaTagManagerTest extends UnitTestCase
self::assertEquals([['content' => 'Description 1', 'subProperties' => []]], $manager->getProperty('description', 'property'));
$manager->removeProperty('description', 'property');
$manager->removeProperty('Description', 'Property');
self::assertEquals([], $manager->getProperty('description', 'property'));
self::assertEquals(
[
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment