Title: Fatal Error report
Last modified: July 31, 2026

---

# Fatal Error report

 *  [dmcclain](https://wordpress.org/support/users/dmcclain/)
 * (@dmcclain)
 * [1 week, 1 day ago](https://wordpress.org/support/topic/fatal-error-report/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-report%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/shortcodes-ultimate/assets/icon-256x256.gif?rev=2547563)
 * [Shortcodes Ultimate - Content Elements](https://wordpress.org/plugins/shortcodes-ultimate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcodes-ultimate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcodes-ultimate/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcodes-ultimate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcodes-ultimate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcodes-ultimate/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [dmcclain](https://wordpress.org/support/users/dmcclain/)
 * Last activity: [1 week, 1 day ago](https://wordpress.org/support/topic/fatal-error-report/)
 * Status: not a support question