Support » Plugin: Widget Logic » PHP Parse Syntax error – unexpected ';' in widget_logic.php(284)

  • Resolved wp_victim

    (@wp_victim)


    I notice in my log that I’ve been getting a lot errors for

    PHP Parse error: syntax error, unexpected ‘;’ in /var/www/vhosts/mywebsite.com/releases/20140528_1/wp-content/plugins/widget-logic/widget_logic.php(284) : eval()’d code on line 1

    I’ve a Multisite installation with several sites and I can’t see any error on the websites… Also didn’t figure out how to reproduce the error, since my log is for multiple sites.

    I’ve seen the topic (related to version 0.53)

    but apparently this issue was fixed on version 0.54.

    I heard someone in the old post mentioning to remove the ; from the quotes “”. (by philibertperusse)

    if (stristr($wl_value,"return")===false)
      $wl_value="return (" . $wl_value . ")<strong>;</strong>";

    Can anyone help me? and is anybody having this error on version .56?

    https://wordpress.org/plugins/widget-logic/

Viewing 4 replies - 1 through 4 (of 4 total)
  • I had a similar error and it pertained to my logic code, which was incorrect. If you haven’t solved your problem yet, remove all items with logic in them and see if the error disappears.

    Then re-enable them one at a time, refreshing the page each time you add one to see if the error returns.

    In my particular case, I had two ”page-slug-” surrounding one of my logic items.

    Thread Starter wp_victim

    (@wp_victim)

    Thank you Anrkist!!

    I will check what you suggested and let you know if worked!

    Thread Starter wp_victim

    (@wp_victim)

    Thank you Anrkist!!!

    What we did was..

    Go in the dashboard > Appearance > export all the widgets and search for ‘;’.

    Finding the ; was easy to see which one was incorrect.

    Thank you for your help!!

    This error was blinding me to find other issues in my log.

    Great! Glad I could help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP Parse Syntax error – unexpected ';' in widget_logic.php(284)’ is closed to new replies.