Parse error
-
We have the latest version of WordPress (4.9), the latest version of all of our themes, and the latest version of all of our plugins, including Widget Logic (5.9.0). Sometime recently, we started seeing lots of the following parse errors (17 on our home page!):
Parse error: syntax error, unexpected 'show' (T_STRING), expecting ']' in /home/wp_99emjk/danburyshul.org/wp-content/plugins/widget-logic/widget_logic.php(461) : eval()'d code on line 1
Lines 460 through 467 in widget_logic.php are:
try { $show_widget = eval($logic); } catch ( Error $e ) { trigger_error( $e->getMessage(), E_USER_WARNING ); $show_widget = false; }
so it’s clear that we have the dreaded PHP syntax error that’s mentioned in the FAQ. I didn’t put together the site, so it’s not clear to me if this site ever worked correctly with Widget Logic in the past while hiding the error messages and the latest version has just started displaying the errors, or if the latest version broke Widget Logic control fields that had previously been working.
[Edited to add: I’ve tried the
wp_reset_query
option and every variation of the load logic point without success, although sometimes the number of error messages changes depending on the chosen load logic point.]As an example of one of the control fields that is causing an error, we have:
[feather_share show=”facebook, twitter, youtube”]
as the Widget Logic control field for the Social Media Feather widget. Does that give anyone any idea why Widget Logic 5.9.0 is complaining? (We’ve disabled Widget Logic for now, since the site is unusable with all of the error messages.)
Thanks in advance for any insight or suggestions.
- This topic was modified 7 years, 4 months ago by . Reason: Added more information about attempted fixes
The page I need help with: [log in to see the link]
- The topic ‘Parse error’ is closed to new replies.