#105825Passing null to parameter #1 ($string) of type string is deprecated in ...FileList.php line 664
Description
After updating TYPO3 to 12.4.23 we faced an issue in backend module filelist as admin when switching to “list view”.
Complete error message:
PHP Runtime Deprecation Notice: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /app/vendor/typo3/cms-filelist/Classes/FileList.php line 664
This may be related to the fact that the server cannot render PDF as images at the moment, but I’m not totally sure.
Reviews 1
Related issues 1
History 810
-
Georg Ringer commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2024-12-15T18:44:08+00:00" > 12/15/24, 18:44 </span> -
Garvin Hicking commented and changed category <span data-processor="relativetime" data-value="2024-12-16T07:23:54+00:00" > 12/16/24, 07:23 </span>
(@just2b – I guess we would need to catch for “null” and not emit the whole in that case?)
-
Alex Kellner commented <span data-processor="relativetime" data-value="2024-12-16T08:19:19+00:00" > 12/16/24, 08:19 </span>
I’m not able to test the changes from Georg because I don’t have write access to the server were this problem came up
-
Marcus Schwemer commented <span data-processor="relativetime" data-value="2024-12-16T15:47:51+00:00" > 12/16/24, 15:47 </span>
I was able to test it.
The solution of Georg works.
Thx. I will patch the core here for now.
If there is something to review, I am happy to do that.
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 87535 status
Needs FeedbackUnder Review <span data-processor="relativetime" data-value="2024-12-17T14:23:46+00:00" > 12/17/24, 14:23 </span> -
Oliver Bartsch commented <span data-processor="relativetime" data-value="2024-12-17T14:26:10+00:00" > 12/17/24, 14:26 </span>
Hi,
thanks for reporting. This has already been fixed with #82855 in main and v13 with. I’ve now partially backported this to v12. You can test this https://review.typo3.org/c/Packages/TYPO3.CMS/+/87535.
Best, Oli
-
Oliver Bartsch changed Related to #82855 <span data-processor="relativetime" data-value="2024-12-17T14:26:16+00:00" > 12/17/24, 14:26 </span>
-
Gerrit Code Review pushed patch set 2 for 12.4 to change 87535 <span data-processor="relativetime" data-value="2024-12-17T14:26:25+00:00" > 12/17/24, 14:26 </span>
-
Oliver Bartsch commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2024-12-17T15:50:09+00:00" > 12/17/24, 15:50 </span>Applied in changeset commit:48bc267af9b38468ba14fbf0aa6859e6e40003d4.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:27:30+00:00" > 12/02/25, 14:27 </span>
thanks for your report! can you please test if changing the code works for you
return '<br><img src="' . htmlspecialchars($processedFile->getPublicUrl() ?? '') . '" ' . 'width="' . htmlspecialchars((string)$processedFile->getProperty('width')) . '" ' . 'height="' . htmlspecialchars((string)$processedFile->getProperty('height')) . '" ' . 'title="' . htmlspecialchars((string)$resourceView->getName()) . '" ' . 'loading="lazy" ' . 'alt="" />';