1
0
Fork 0

Fix support for imagemagick <3.3, refs #7762

pull/7806/head
meyerbaptiste 2018-11-27 16:27:01 +01:00
parent 489e0d4b12
commit 5ce5560040
No known key found for this signature in database
GPG Key ID: 5F6216DC1890E6EC
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':