Skip to content

Missing image breaks RSS feed #141

@kaittodesk

Description

@kaittodesk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions