[wp-trac] [WordPress Trac] #42102: File Editor: Make fatal error detection more robust for edits to PHP files

WordPress Trac noreply at wordpress.org
Sat Oct 7 08:14:49 UTC 2017


#42102: File Editor: Make fatal error detection more robust for edits to PHP files
--------------------------+--------------------------
 Reporter:  westonruter   |       Owner:  westonruter
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  4.9
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+--------------------------

Comment (by pixolin):

 Hello,

 I'm testing 4.9-beta1-41785 and get following reproducable issue:

 I got to ''Appearance'' => ''Editor'', Select `functions.php` of theme
 Twenty Seventeen (or any other), delete a closing bracket and ''Update
 File'', my change gets confirmed with a message `"File edited
 successfully."`. If I then leave the editor and open any other webpage in
 front- or backend, I receive a
 {{{
 Fatal error: syntax error, unexpected ';' in /Users/bego/MAMP/dev/wp-
 content/themes/twentyseventeen/functions.php on line 16
 }}}

 While this is the expected result due to the code change, it breaks the
 website and can only be fixed by chaning the file via FTP. '''The fatal
 error was not detected in the theme editor.'''

 If I go back in browsing history, I can see the file editor and replace
 the missing bracket, but get an error message "save error" (which looks
 like a correct error message, as the website is broken).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42102#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list