• I hope you folks don’t mind me sending a bug report my AI suggested I notify you about. I think I’ve corrected what I was experiencing this morning, but in case this helps you at all:


    Plugin: Shortcodes Ultimate
    Plugin Version: (check in WP Admin → Plugins)
    WordPress Version: 7.0.2
    PHP Version: 8.3.6
    Multisite: No

    Error Message:

    Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /srv/www/wordpress/wp-content/plugins/shortcodes-ultimate/inc/core/tools.php:94 PHP Warning: Undefined variable $myObj in /srv/www/wordpress/wp-content/plugins/arena-liveblog-and-chat-tool/shortcode/init.php on line 228

    Location: /srv/www/wordpress/wp-content/plugins/shortcodes-ultimate/inc/core/tools.php on line 94

    Stack Trace Snippet:

    #0 /srv/www/wordpress/wp-content/plugins/shortcodes-ultimate/includes/shortcodes/custom-gallery.php(145): su_image_resize() #1 /srv/www/wordpress/wp-includes/shortcodes.php(434): su_shortcode_custom_gallery() #2 /srv/www/wordpress/wp-includes/shortcodes.php(273): preg_replace_callback() #3 /srv/www/wordpress/wp-content/plugins/wordpress-seo/src/builders/indexable-link-builder.php(140): apply_filters() #4 phar:///usr/local/bin/wp/vendor/wp-cli/entity-command/src/Post_Command.php(366): wp_update_post()

    Trigger Scenario:

    1. A post contains a Shortcodes Ultimate gallery shortcode ([su_gallery])
    2. Post is updated via WP-CLI: wp post update <id> --post_author=<new_id>
    3. wp_update_post() fires save_post action
    4. Yoast SEO’s Indexable_Post_Watcher hooks in and rebuilds indexable links
    5. This triggers do_shortcode() on the post content
    6. Gallery shortcode calls su_image_resize() which returns a WP_Error
    7. Code at line 94 attempts to access the result as an array → Fatal Error

    Expected Behavior: su_image_resize() should either return a valid array or the caller should check for WP_Error before treating the result as an array.

    Impact: Any post update operation fails with a fatal error when the post contains gallery shortcodes. This affects bulk operations, imports, migrations, and automated post saves.

    Additional Note: There’s also an undefined variable warning in the Arena Liveblog plugin at /arena-liveblog-and-chat-tool/shortcode/init.php:228 (Undefined variable $myObj), though this is non-blocking compared to the Shortcodes Ultimate fatal error.

    Recommendation: Add error handling in inc/core/tools.php:94 to verify the result is not a WP_Error instance before accessing it as an array.

You must be logged in to reply to this topic.