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

WordPress Trac noreply at wordpress.org
Fri Dec 4 20:19:43 UTC 2020


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

Comment (by SergeyBiryukov):

 Replying to [ticket:51937 Boniu91]:
 > Error itself:
 > https://snippi.com/s/zjvyr9t

 For reference, just in case that link becomes inaccessible later, the
 error is:
 {{{
 [04-Dec-2020 14:09:48 UTC] PHP Fatal error:  Uncaught ValueError:
 imagecreatetruecolor(): Argument #1 ($width) must be greater than 0 in
 /home/customer/www/domain.dev/public_html/wp-includes/media.php:3511

 Stack trace:
 #0 /home/customer/www/domain.dev/public_html/wp-includes/media.php(3511):
 imagecreatetruecolor(0, 0)
 #1 /home/customer/www/domain.dev/public_html/wp-includes/class-wp-image-
 editor-gd.php(326): wp_imagecreatetruecolor(0, 0)
 #2 /home/customer/www/domain.dev/public_html/wp-
 admin/includes/image.php(44): WP_Image_Editor_GD->crop(0, 0, 0, 0, 0, 0,
 false)
 #3 /home/customer/www/domain.dev/public_html/wp-admin/includes/ajax-
 actions.php(3874): wp_crop_image('/home/customer/...', 0, 0, 0, 0, 0, 0)
 #4 /home/customer/www/domain.dev/public_html/wp-includes/class-wp-
 hook.php(287): wp_ajax_crop_image('')
 #5 /home/customer/www/domain.dev/public_html/wp-includes/class-wp-
 hook.php(311): WP_Hook->apply_filters('', Array)
 #6 /home/customer/www/domain.dev/public_html/wp-includes/plugin.php(484):
 WP_Hook->do_action(Array)
 #7 /home/customer/www/domain.dev/public_html/wp-admin/admin-ajax.php(184):
 do_action('wp_ajax_crop-im...')
 #8 {main}
   thrown in /home/customer/www/domain.dev/public_html/wp-
 includes/media.php on line 3511
 }}}

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


More information about the wp-trac mailing list