Project

General

Profile

Actions

Bug #103778

closed

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

Added by Sebastian Mazza about 1 month ago. Updated 30 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

Also available in: Atom PDF