{"id":18694411,"date":"2025-10-24T15:27:21","date_gmt":"2025-10-24T15:27:21","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/file-based-execution-mode-fatal-not-handled\/"},"modified":"2025-10-24T15:27:21","modified_gmt":"2025-10-24T15:27:21","slug":"file-based-execution-mode-fatal-not-handled","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/file-based-execution-mode-fatal-not-handled\/","title":{"rendered":"File-based execution mode Fatal not handled"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hello! I activated file-based execution mode and immediately got a fatal error:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">PHP Fatal error: Cannot redeclare do_wp_mail_forced_to() (previously declared in wp-content\/code-snippets\/dafeda30b2607c356aa4a8d750591e94\/php\/52.php:15) in wp-content\/plugins\/code-snippets\/php\/snippet-ops.php(599) : eval()&#8217;d code on line 10<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Looks like there&#8217;s 2 matches for our custom function definition somehow:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$ fgrep do_wp_mail_forced_to .\/*<br \/>.\/52.php: add_filter(&#8216;wp_mail&#8217;, &#8216;do_wp_mail_forced_to&#8217;, 1, 1);<br \/>.\/52.php: function do_wp_mail_forced_to($args)<br \/>.\/index.php: add_filter(\\&#8217;wp_mail\\&#8217;, \\&#8217;do_wp_mail_forced_to\\&#8217;, 1, 1);<br \/>.\/index.php: function do_wp_mail_forced_to($args)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">(1) You might want to figure out some way to handle fatals in the script file execution.<br \/>(2) How can I disable file-based execution mode now that the code-snippets plugin UI fails (actually, the whole <a href=\"https:\/\/oacdev.uvic.ca\/wp-admin\/network\/\">https:\/\/mysite.com\/wp-admin\/network\/<\/a> fails)?<\/p>\n","protected":false},"template":"","class_list":["post-18694411","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18694411","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\/18694411\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18694411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}