Make WordPress Core

#57392 closed defect (bug) (invalid)

class-wc-regenerate-images.php::maybe_resize_image is not checking mime type which leads to fatal error

Reported by: mjdewitt's profile mjdewitt Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.1.1
Component: Media Keywords:
Focuses: Cc:


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.

Attachments (1)

woocommerce-php82-error.log (2.1 KB) - added by cfken 18 months ago.
Full Error Output

Download all attachments as: .zip

Change History (3)

#1 @cfken
18 months ago

Having the same issue after upgrading to PHP 8.2. I have attached the relevant log output.

Version 1, edited 18 months ago by cfken (previous) (next) (diff)

18 months ago

Full Error Output

#2 @peterwilsoncc
18 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

@mjdewitt Hello and welcome to trac!

Trac is used for reporting of issues in WordPress rather than for plugins. I recommend you reach out to the WooCommerce team via the plugins support forum.

I'm going to close this ticket as invalid, which in this case it trac's unfriendly term to indicate you've been referred to the plugin's support forum.

Note: See TracTickets for help on using tickets.