On some news-items the bootstrap-package throws an error when processing a svg-image as file-reference.
Other news-entries work.
The exception occurs in EXT:/bootstrap_package/Classes/ViewHelpers/Data/ImageInfoViewHelper.php::67 (version 14.0.7)
Steps to Reproduce
Not really reproduceable.
But: the viewhelper get a file-reference (object) instead of the file-name (string)
Expected behavior
no exception when the viewhelper processes a simple strpos-cmd.
Actual behavior
excpetion, see screenshot
Screenshots
Fix
change line 67:
from:
if (strpos($src, $mediaName) !== false) {
to:
if (is_string($src) && strpos($src, $mediaName) !== false) {
to make strpos typesafe.
Versions
You can get this information from executing composer show at the command line
if your TYPO3 installation is composer based, otherwise the version number will
be shown in the extension manager.
Bug Report
Prerequisites
Description
On some news-items the bootstrap-package throws an error when processing a svg-image as file-reference. Other news-entries work. The exception occurs in EXT:/bootstrap_package/Classes/ViewHelpers/Data/ImageInfoViewHelper.php::67 (version 14.0.7)
Steps to Reproduce
Not really reproduceable. But: the viewhelper get a file-reference (object) instead of the file-name (string)
Expected behavior
no exception when the viewhelper processes a simple strpos-cmd.
Actual behavior
excpetion, see screenshot
Screenshots
Fix
change line 67: from:
if (strpos($src, $mediaName) !== false) {
to:if (is_string($src) && strpos($src, $mediaName) !== false) {
to make strpos typesafe.Versions
You can get this information from executing
composer show
at the command line if your TYPO3 installation is composer based, otherwise the version number will be shown in the extension manager.Typo3 v11.5.32