Commit a4b7457e authored by Nikita Hovratov's avatar Nikita Hovratov Committed by Benni Mack
Browse files

[BUGFIX] Cast meta tag values to string in generateMetaTagHtml

It is possible for values returned by stdWrap to be of type int.
RequestHandler->generateMetaTagHtml() expects meta tag values to be
of type string. In order to avoid php errors, return values are now
casted to strings.

Resolves: #91533
Releases: master, 10.4, 9.5
Change-Id: I642d5fe0189955e26689a6cf65cdbe23255356a2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64636


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 595d94d9
......@@ -939,7 +939,7 @@ class RequestHandler implements RequestHandlerInterface
$replace = false;
if (is_array($properties)) {
$nodeValue = $properties['_typoScriptNodeValue'] ?? '';
$value = trim($cObj->stdWrap($nodeValue, $metaTagTypoScript[$key . '.']) ?? '');
$value = trim((string)$cObj->stdWrap($nodeValue, $metaTagTypoScript[$key . '.']));
if ($value === '' && !empty($properties['value'])) {
$value = $properties['value'];
$replace = false;
......
Supports Markdown
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