Title: Parse error
Last modified: December 13, 2017

---

# Parse error

 *  [kennis.koldewyn](https://wordpress.org/support/users/kenniskoldewyn/)
 * (@kenniskoldewyn)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/parse-error-468/)
 * 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 8 years, 6 months ago by [kennis.koldewyn](https://wordpress.org/support/users/kenniskoldewyn/).
      Reason: Added more information about attempted fixes
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fparse-error-468%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [WPChef](https://wordpress.org/support/users/wpchefgadget/)
 * (@wpchefgadget)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/parse-error-468/#post-9706327)
 * Hi kennis.koldewyn,
 * Do you mean you put [feather_share show=”facebook, twitter, youtube”] into the
   logic field? If so, this is not correct b/c the logic field should contain some
   properly written PHP code in it.
 * _[ [Signature deleted](https://wordpress.org/support/guidelines/#avoid-signatures)]_
    -  This reply was modified 7 years, 10 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
 *  Thread Starter [kennis.koldewyn](https://wordpress.org/support/users/kenniskoldewyn/)
 * (@kenniskoldewyn)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/parse-error-468/#post-9707386)
 * Yes, the person who originally created the site apparently put
 * `[feather_share show="facebook, twitter, youtube"]`
 * into the Widget Logic control field for the Social Media Feather widget. So what
   you’re suggesting is that this code never worked, since it’s not valid PHP, even
   with an earlier version of Widget Logic? Any idea why all visitors to the site
   are only now seeing parse errors (when Widget Logic is enabled)? I suppose if
   the site’s use of Widget Logic never worked, then it should be fairly safe to
   simply disable it, since the site was never getting any use out of it.
 * However, as a computer programmer with almost no WordPress experience, I can 
   imagine another scenario: is it possible that the control fields somehow got 
   munged by a WordPress, theme, or plugin update? Is there some way I could look
   back at earlier versions of what was in the control fields? I’m not sure where
   to look for earlier revisions, since use of the Widget Logic control fields in
   this site seems limited to the theme customization (which shows no user interface
   for exploring earlier revisions), not the site’s regular pages (which do show
   earlier revisions). BTW, the theme in question appears to be Genesis (version
   2.5.3), since that’s showing up between “Forms” and “Appearance” in the site’s
   admin menu.
    -  This reply was modified 8 years, 6 months ago by [kennis.koldewyn](https://wordpress.org/support/users/kenniskoldewyn/).
 *  [WPChef](https://wordpress.org/support/users/wpchefgadget/)
 * (@wpchefgadget)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/parse-error-468/#post-9707637)
 * Hi kennis.koldewyn,
 * Correct, this code never worked before, since it’s not a valid PHP syntax, even
   in any earlier versions of Widget Logic. The site visitors are seeing parse errors
   b/c the plugin tries to execute the code entered into the logic field and throws
   the errors since the code is invalid. You’re correct, Widget Logic should be 
   safe to disable in this situation. Unfortunately, there is no way to see what
   was entered in the logic field before.
 * _[ [Signature deleted](https://wordpress.org/support/guidelines/#avoid-signatures)]_
    -  This reply was modified 7 years, 10 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Parse error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/widget-logic_c8dde5.svg)
 * [Widget Logic](https://wordpress.org/plugins/widget-logic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/widget-logic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/widget-logic/)
 * [Active Topics](https://wordpress.org/support/plugin/widget-logic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/widget-logic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/widget-logic/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [WPChef](https://wordpress.org/support/users/wpchefgadget/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/parse-error-468/#post-9707637)
 * Status: not resolved