diff --git a/imageapi_imagemagick.module b/imageapi_imagemagick.module index 3171d0b..bc6aea6 100644 --- a/imageapi_imagemagick.module +++ b/imageapi_imagemagick.module @@ -217,7 +217,11 @@ function _imageapi_imagemagick_convert_exec($command_args, &$output, &$errors) { drupal_set_message(t('ImageMagick output: @output', array('@output' => $output))); } - if ($return_code != 0) { + if ($return_code == 1 && $command_args == '-version') { + // Some versions of ImageMagick return status code 1 when outputting the + // version info. This should not be caught as an error. + } + else if ($return_code != 0) { // If ImageMagick returned a non-zero code, trigger a PHP error that will // be caught by Drupal's error handler, logged to the watchdog and // eventually displayed to the user if configured to do so.