Closed landscape-ooo closed 7 years ago
if run in ImageMagick-6.5.4-10 ,which is >0x632 , could fail in such fatal error . some bug appear in “imagick_helpers.c” eg , 0x632< 0x637 ,if MagickLibVersion= 0x631 ,it will run into twice and redeclare LAYERMETHOD_COMPOSITE twice
diff --git a/imagick_helpers.c b/imagick_helpers.c index ba96892..a9aaccd 100644 --- a/imagick_helpers.c +++ b/imagick_helpers.c @@ -1528,7 +1528,7 @@ void php_imagick_initialize_constants(TSRMLS_D) IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_REMOVEZERO", RemoveZeroLayer);
diff --git a/imagick_helpers.c b/imagick_helpers.c index ba96892..a9aaccd 100644 --- a/imagick_helpers.c +++ b/imagick_helpers.c @@ -1528,7 +1528,7 @@ void php_imagick_initialize_constants(TSRMLS_D) IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_REMOVEZERO", RemoveZeroLayer);
Hi,
Thanks for the issue report - however you have completely confused me.
i. The word LAYERMETHOD_COMPOSITE only appears in the source code once
ii. All the tests pass on travis
iii. I can't see a commit starting with ba96892 in the recent history.
iv. Pull requests are far easier to process than patches.
Please can you check that you are using an up-to-date version of Imagick, and create a pull-request against that?
cheers Dan
Closing, as I don't think there is a problem in the current code.
Please feel free to update with more information.
========error from php-cli(fpm) log [09-Feb-2017 11:50:23 UTC] PHP Fatal error: Cannot redefine class constant Imagick::LAYERMETHOD_COMPOSITE in Unknown on line 0
========source code
if MagickLibVersion > 0x632
endif
if MagickLibVersion >= 0x637
endif