Can't correct syntax error in WP editor
-
Is this a bug:
I’m trying to build a new function in my child theme functions.php. When something wasn’t right, I got an error message in the browser:
Parse error: syntax error, unexpected ‘{‘ in /webroot/r/e/resea005/lynunderwood/www/wp-content/themes/veryplaintxt_child/functions.php on line 9.
There weren’t any syntax errors. When I copied the function to a simple php file it ran fine. And there wasn’t any ‘{‘ in line 9. (As nearly as I can tell–WP editor doesn’t show line numbers.)
But what really got me is that the editor wouldn’t let me correct it. I even tried deleting the entire function and still got the same syntax error message. I had to go to my webhosting site and manually remove the function there–none of the changes I had tried to make ever got saved.
How does one correct a syntax error in the WP editor if WP doesn’t even let you save the corrected code?
Thanks.
- The topic ‘Can't correct syntax error in WP editor’ is closed to new replies.