1
0
Fork 0

Merge pull request #7806 from meyerbaptiste/fix/lib-imagick

Fix support for imagemagick <3.3
pull/7835/head
Jordi Boggiano 2018-11-27 16:52:09 +01:00 committed by GitHub
commit 1970e97b47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 8 deletions

View File

@ -158,15 +158,10 @@ class PlatformRepository extends ArrayRepository
break;
case 'imagick':
$reflector = new \ReflectionExtension('imagick');
ob_start();
$reflector->info();
$output = ob_get_clean();
preg_match('/^(Imagick using ImageMagick library version|ImageMagick version) => ImageMagick ([\d.]+)-(\d+)/m', $output, $matches);
$imagick = new \Imagick();
$imageMagickVersion = $imagick->getVersion();
preg_match('/^ImageMagick ([\d.]+)-(\d+)/', $imageMagickVersion['versionString'], $matches);
$prettyVersion = "{$matches[1]}.{$matches[2]}";
break;
case 'libxml':