Opened 9 years ago
Closed 9 years ago
#36501 closed defect (bug) (fixed)
Fatal error: Undefined class constant 'ALPHACHANNEL_UNDEFINED'
Reported by: | gblsm | Owned by: | kirasong |
---|---|---|---|
Milestone: | 4.5.1 | Priority: | normal |
Severity: | normal | Version: | 4.5 |
Component: | Media | Keywords: | has-patch fixed-major |
Focuses: | Cc: |
Description
After upgrading to WordPress 4.5 today, some people have reported that a Fatal error occurs when they upload an image through Admin > Media.
Fatal error: Undefined class constant 'ALPHACHANNEL_UNDEFINED' in /home/users/2/lolipop.jp-xxxxx/web/news/wp-includes/class-wp-image-editor-imagick.php on line 379
I found that the parameter for PHP’s define function caused the error. It should be quoted but is not done right now. The patch to this is attached.
if ( is_callable( array( $this->image, 'getImageAlphaChannel' ) ) && is_callable( array( $this->image, 'setImageAlphaChannel' ) ) && defined( 'Imagick::ALPHACHANNEL_UNDEFINED' ) && defined( 'Imagick::ALPHACHANNEL_OPAQUE' ) ) { if ( $this->image->getImageAlphaChannel() === Imagick::ALPHACHANNEL_UNDEFINED ) { $this->image->setImageAlphaChannel( Imagick::ALPHACHANNEL_OPAQUE ); } }
Attachments (1)
Change History (13)
#1
in reply to:
↑ description
@
9 years ago
#3
@
9 years ago
- Owner set to mikeschroder
- Resolution set to fixed
- Status changed from new to closed
In 37192:
#4
@
9 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for 4.5.1.
This ticket was mentioned in Slack in #core by mike. View the logs.
9 years ago
#7
follow-up:
↓ 8
@
9 years ago
@mikeschroder, do you have a target date of WordPress 4.5.1 release?
Some "Lollipop" (one of major hosting service in Japan) users are affected by this issue and they have no plan to update ImageMagick. (So, the faster release, the better.)
#8
in reply to:
↑ 7
;
follow-up:
↓ 10
@
9 years ago
Replying to extendwings:
@mikeschroder, do you have a target date of WordPress 4.5.1 release?
Some "Lollipop" (one of major hosting service in Japan) users are affected by this issue and they have no plan to update ImageMagick. (So, the faster release, the better.)
No, I do not have a target date at this point. Am concerned about the breakage, and it absolutely needs to be fixed (it's a bug, and the fix has been committed to trunk), but it's worth noting that this seems to be the only host that users have reported issues with thusfar. I'm very interested in knowing if there are more instances.
ImageMagick 6.4.6 was released in 2008, so this is probably the reason that fewer users are affected than would otherwise be.
It's likely that the timeline for 4.5.1 will be discussed at next week's dev meeting (April 20 at 2000 UTC).
#9
@
9 years ago
Lolipop identified that some of their old servers are affected by this, and officially announced the solution for the issue. They also provide the method for migrating to a non-affected server for their customers, so it seems to be OK somehow.
#10
in reply to:
↑ 8
@
9 years ago
Replying to mikeschroder:
...seems to be the only host that users have reported issues with thusfar. I'm very interested in knowing if there are more instances.
I have a user on http://www.surpasshosting.com having this issue. They're running version 6.4.1 of ImageMagick.
The issue was originally reported in this WordPress Japanese forum thread:
https://ja.forums.wordpress.org/topic/158985
Thank you for reporting @amachang, @qingmu with support from @extendwings