[wp-trac] [WordPress Trac] #57392: class-wc-regenerate-images.php::maybe_resize_image is not checking mime type which leads to fatal error

WordPress Trac noreply at wordpress.org
Wed Dec 28 16:12:36 UTC 2022


#57392: class-wc-regenerate-images.php::maybe_resize_image is not checking mime
type which leads to fatal error
--------------------------+-----------------------------
 Reporter:  mjdewitt      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  6.1.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 This leads to a fatal error for attachments like PDFs:

 An error of type E_ERROR was caused in line 276 of the file /wp-
 content/plugins/woocommerce/includes/class-wc-regenerate-images.php. Error
 message: Uncaught TypeError: Cannot access offset of type string on string
 in /www/csg/wp-content/plugins/woocommerce/includes/class-wc-regenerate-
 images.php:276

 Why maybe_resize_image() is not checking the parent post_type for
 applicability is another question.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57392>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list