Skip to content

Commit 956a061

Browse files
committed
Remove shell_exec for convert
Fixes #65 This simply removes the `imagemagick` reporting under `system_utils` as the Package information isn't actually needed. Imagic php_module is already reported earlier in the same array. `convert` isn't always present on systems since the imagemagick package package doesn't need to be installed along the php_module.
1 parent 6a6599a commit 956a061

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

functions.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,6 @@ function get_env_details() {
214214
$curl = array_shift( $curl_bits );
215215
$env['system_utils']['curl'] = trim( $curl );
216216
$env['system_utils']['ghostscript'] = trim( shell_exec( 'gs --version' ) );
217-
$ret = shell_exec( 'convert --version' );
218-
preg_match( '#Version: ImageMagick ([^\s]+)#', $ret, $matches );
219-
$env['system_utils']['imagemagick'] = isset( $matches[1] ) ? $matches[1] : false;
220217
$env['system_utils']['openssl'] = str_replace( 'OpenSSL ', '', trim( shell_exec( 'openssl version' ) ) );
221218
return $env;
222219
}

prepare.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@
7878
\$curl = array_shift( \$curl_bits );
7979
\$env['system_utils']['curl'] = trim( \$curl );
8080
\$env['system_utils']['ghostscript'] = trim( shell_exec( 'gs --version' ) );
81-
\$ret = shell_exec( 'convert --version' );
82-
preg_match( '#Version: ImageMagick ([^\s]+)#', \$ret, \$matches );
83-
\$env['system_utils']['imagemagick'] = isset( \$matches[1] ) ? \$matches[1] : false;
8481
\$env['system_utils']['openssl'] = str_replace( 'OpenSSL ', '', trim( shell_exec( 'openssl version' ) ) );
8582
file_put_contents( __DIR__ . '/tests/phpunit/build/logs/env.json', json_encode( \$env, JSON_PRETTY_PRINT ) );
8683
if ( 'cli' === php_sapi_name() && defined( 'WP_INSTALLING' ) && WP_INSTALLING ) {

0 commit comments

Comments
 (0)