#101875TYPO3 v.12 | Graphics Magick does not work!!!
Description
In \typo3\cms-install\Classes\Configuration\Image\GraphicsMagickPreset.php findGraphicsMagickInPaths gets called with:
[
'/usr/local/bin/',
'/opt/local/bin/',
'/usr/bin/',
'/usr/X11R6/bin/',
'/opt/bin/',
'C:/php/ImageMagick/',
'C:/php/GraphicsMagick/',
'C:/apache/ImageMagick/',
'C:/apache/GraphicsMagick/',
]
protected function findGraphicsMagickInPaths(array $searchPaths)
{
$result = false;
foreach ($searchPaths as $path) {
if (Environment::isWindows()) {
$executable = 'gm.exe';
} else {
$executable = 'gm';
}
$binaryPath = $path . $executable;
if (!file_exists($binaryPath) || !is_executable($binaryPath)) {
break;
}
$command = escapeshellarg($binaryPath) . ' -version';
$executingResult = [];
@CommandUtility::exec($command, $executingResult);
// First line of exec command should contain string GraphicsMagick
$firstResultLine = array_shift($executingResult);
if (is_string($firstResultLine) && str_contains($firstResultLine, 'GraphicsMagick')) {
$this->foundPath = $path;
$result = true;
break;
}
}
return $result;
}
The break makes it imposible to reach to our path [/usr/bin/]……
Please replace the break with continue :-)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Files 1
History 3
-
Stefan Bürk changed Duplicates #101687 09/07/23, 13:52
-
Stefan Bürk commented and changed status
NewResolved assigned to Stefan Bürk 09/07/23, 13:54 -
Benni Mack changed status
ResolvedClosed 07/09/24, 15:19
This is already fixed and resolved with #101687.
Will be included in the next release.
Note: If you have a composer based installation, you may use
composer patches to test the v12 backport as composer patch
until the release.
Going to close this issue as duplicate and solved issue. If
this was to early feel free to reopening or request to opening
the issue again.