Bug #103778
closedThe method TYPO3\CMS\Core\Utility\CommandUtility::exec() has the wrong return type
100%
Description
On some hosting environment the following error happens while executing the Image Processing test of the install tool.
Core: Exception handler (WEB): Uncaught TYPO3 Exception: TYPO3\CMS\Core\Utility\CommandUtility::exec(): Return value must be of type string, false returned | TypeError thrown in file /home/.sites/298/site7281255/web/t3v12/vendor/typo3/cms-core/Classes/Utility/CommandUtility.php in line 87. Requested URL: https://www.xxxxx.comt/typo3/install.php?install%5Bcontroller%5D=environment&install%5Bcontext%5D=backend&install%5Baction%5D=imageProcessingReadPdf
Unfortunately it is not possible anymore to execute the image tests separately like in previous versions of TYPO3. Furthermore, the install tool popup shows only "Ajax Error...." if an error occurs on any image processing Ajax request. Therefore, it is impossible to know which test leads to the problem.
My solution:
Change the method head of TYPO3\CMS\Core\Utility\CommandUtility::exec() from
public static function exec(string $command, ?array &$output = null, int &$returnValue = 0): string
to
public static function exec(string $command, ?array &$output = null, int &$returnValue = 0): string|bool
Interestingly all image test can be executed without a problem after this change. Furthermore, all images looks correct to me.
Updated by Gerrit Code Review 15 days ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84135
Updated by Gerrit Code Review 15 days ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84116
Updated by Georg Ringer 15 days ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 016e509c438ae8b78699c54513490d58f8385085.