Project

General

Profile

Actions

Bug #103778

closed

The method TYPO3\CMS\Core\Utility\CommandUtility::exec() has the wrong return type

Added by Sebastian Mazza 16 days ago. Updated 15 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Image Generation / GIFBUILDER
Target version:
-
Start date:
2024-05-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions #1

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

Actions #2

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

Actions #3

Updated by Georg Ringer 15 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF