#104039Uncaught TYPO3 Exception: fwrite(): Argument #2 ($data) must be of type string, false given | TypeError thrown in file GeneralUtility.php in line 1604.
Description
Core: Exception handler (WEB): Uncaught TYPO3 Exception: fwrite(): Argument #2 ($data) must be of type string, false given | TypeError thrown in file /../vendor/typo3/cms-core/Classes/Utility/GeneralUtility.php in line 1604.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
Files 1
History 5
-
Bastian Holzem changed Related to #101998 <span data-processor="relativetime" data-value="2024-06-11T08:17:46+00:00" > 06/11/24, 08:17 </span>
-
Oliver Hader commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2024-06-11T08:48:38+00:00" > 06/11/24, 08:48 </span> -
Bastian Holzem commented <span data-processor="relativetime" data-value="2024-06-11T09:00:13+00:00" > 06/11/24, 09:00 </span>
Oliver Hader wrote in #note-2:
> Can you please provide the location/class that is calling\TYPO3\CMS\Core\Utility\GeneralUtility::writeFile? Thanks!error occurred directly after updating TYPO3 12.4.15 to TYPO3 12.4.16
but probably only once, now it doesn’t occur anymore, I’ll have to check again with the next update -
Georg Ringer commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2024-06-25T04:42:11+00:00" > 06/25/24, 04:42 </span>Hey Bastian,
as this happened only once I am closing this issue. Feel free to open a new issue if this can be reproduced on a setup and is not related to e.g. switching versions and not clearing various caches.
-
Felix Heller commented and changed attached callstack_generalutility_writefile.png <span data-processor="relativetime" data-value="2024-08-07T09:08:37+00:00" > 08/07/24, 09:08 </span>
I stumbled across the same problem. It always occurs once after a TYPO3 surf deployment was run for the affected project.
The reason was a missing JavaScript file that I tried to include in TypoScript:
page.includeJS.nonExistingFile = EXT:foo/Resources/Public/JavaScript/Build/config.js
TYPO3 tries to compress this file and calls
GeneralUtility::getUrlfor this path. As there is no such file, thegetUrlmethod returnsfalse, but then theResourceCompressortries to writefalse(bool) into a file intypo3temp/assets/compressed/external-abcdefgh12345678.This is the call stack of PHP Xdebugger:
callstack_generalutility_writefile.pngThe solution for this problem in my case was quite simple: Don’t include non-existing JavaScript files in TypoScript. 😉
Can you please provide the location/class that is calling
\TYPO3\CMS\Core\Utility\GeneralUtility::writeFile? Thanks!