{"id":18980795,"date":"2026-07-31T16:09:25","date_gmt":"2026-07-31T16:09:25","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/fatal-error-report\/"},"modified":"2026-07-31T16:09:25","modified_gmt":"2026-07-31T16:09:25","slug":"fatal-error-report","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/fatal-error-report\/","title":{"rendered":"Fatal Error report"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I hope you folks don&#8217;t mind me sending a bug report my AI suggested I notify you about. I think I&#8217;ve corrected what I was experiencing this morning, but in case this helps you at all:<br \/><br \/><br \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Plugin:<\/strong> Shortcodes Ultimate<br \/><strong>Plugin Version:<\/strong> (check in WP Admin \u2192 Plugins)<br \/><strong>WordPress Version:<\/strong> 7.0.2<br \/><strong>PHP Version:<\/strong> 8.3.6<br \/><strong>Multisite:<\/strong> No<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Error Message:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>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<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Location:<\/strong> <code>\/srv\/www\/wordpress\/wp-content\/plugins\/shortcodes-ultimate\/inc\/core\/tools.php<\/code> on <strong>line 94<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Stack Trace Snippet:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>#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()<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Trigger Scenario:<\/strong><\/p>\n\n\n\n<ol>\n<li>A post contains a Shortcodes Ultimate gallery shortcode (<code>[su_gallery]<\/code>)<\/li>\n\n\n\n<li>Post is updated via WP-CLI: <code>wp post update &lt;id&gt; --post_author=&lt;new_id&gt;<\/code><\/li>\n\n\n\n<li><code>wp_update_post()<\/code> fires <code>save_post<\/code> action<\/li>\n\n\n\n<li>Yoast SEO&#8217;s <code>Indexable_Post_Watcher<\/code> hooks in and rebuilds indexable links<\/li>\n\n\n\n<li>This triggers <code>do_shortcode()<\/code> on the post content<\/li>\n\n\n\n<li>Gallery shortcode calls <code>su_image_resize()<\/code> which returns a <code>WP_Error<\/code><\/li>\n\n\n\n<li>Code at line 94 attempts to access the result as an array \u2192 <strong>Fatal Error<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Expected Behavior:<\/strong> <code>su_image_resize()<\/code> should either return a valid array or the caller should check for <code>WP_Error<\/code> before treating the result as an array.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Impact:<\/strong> 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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Additional Note:<\/strong> There&#8217;s also an undefined variable warning in the Arena Liveblog plugin at <code>\/arena-liveblog-and-chat-tool\/shortcode\/init.php:228<\/code> (<code>Undefined variable $myObj<\/code>), though this is non-blocking compared to the Shortcodes Ultimate fatal error.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Recommendation:<\/strong> Add error handling in <code>inc\/core\/tools.php:94<\/code> to verify the result is not a <code>WP_Error<\/code> instance before accessing it as an array.<\/p>\n","protected":false},"template":"","class_list":["post-18980795","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18980795","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18980795\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18980795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}