[wp-trac] [WordPress Trac] #51937: Fatal error while cropping

WordPress Trac noreply at wordpress.org
Fri Dec 4 21:39:45 UTC 2020


#51937: Fatal error while cropping
---------------------------------+-----------------------------------------
 Reporter:  Boniu91              |       Owner:  iandunn
     Type:  defect (bug)         |      Status:  closed
 Priority:  high                 |   Milestone:  5.6
Component:  Customize            |     Version:  5.6
 Severity:  blocker              |  Resolution:  fixed
 Keywords:  php8 https has-      |     Focuses:  javascript, administration
  patch                          |
---------------------------------+-----------------------------------------
Changes (by iandunn):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"49751" 49751]:
 {{{
 #!CommitTicketReference repository="" revision="49751"
 Media: Return `WP_Error` when cropping with bad input to avoid fatal.

 This avoids an error on PHP 8 caused by calling
 `wp_imagecreatetruecolor()` with inputs that aren't numeric, or are less
 than 0.

 Props hellofromtonya, Boniu91, metalandcoffee, SergeyBiryukov.
 Fixes #51937.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51937#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list