sendsmaily / smaily-woocommerce-plugin

Smaily plugin for WooCommerce
GNU General Public License v3.0
3 stars 0 forks source link

Missing image breaks RSS feed #141

Open kaittodesk opened 2 months ago

kaittodesk commented 2 months ago

Bug description When a product without an image matches RSS feed filter criteria and PHP's display_errors option is set to On, the RSS feed will also output warning:

Warning: Trying to access array offset on value of type bool in /path/to/wordpress/wp-content/plugins/smaily-for-woocommerce/inc/Base/DataHandler.php on line 105

Steps for reproducing

  1. Enable display_errors = On for your WordPress installation.
  2. Go to your WordPress site admin.
  3. Create a product without an image.
  4. Go to Smaily for WooCommerce settings and create an RSS feed URL returning created product.
  5. Navigate to the RSS feed URL.

Expected behavior Missing product image is handled gracefully.

Actual behavior A warning is displayed to the end user, breaking the RSS feed.

Versions WordPress 6.6.1 WooCommerce 9.1.4 Smaily for WooCommerce 1.11.2