Title: Causes PHP error
Last modified: August 20, 2016

---

# Causes PHP error

 *  Resolved [pastorjim](https://wordpress.org/support/users/pastorjim/)
 * (@pastorjim)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/causes-php-error/)
 * My PHP error log shows lots of the same error: PHP Parse error: syntax error,
   unexpected ‘;’ in widget_logic.php(284) : eval()’d code on line 1
    I’ve checked
   my widget logic code and don’t see a problem, though there could be one.
 * —-My Bad. I DID find an extra “(” in one of my widget logic conditions. All is
   good now.

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/causes-php-error/#post-3514275)
 * Site url? It’s possible that your site has been hacked.
 *  [Mike](https://wordpress.org/support/users/maddogmike/)
 * (@maddogmike)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/causes-php-error/#post-3514648)
 * I’m having a similar error after the host updated PHP from 5.2.17 to 5.3.21.
 * `Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ')'
   in /home/user/public_html/wp-content/plugins/widget-logic/widget_logic.php(284):
   eval()'d code on line 1`
 * I notice that I had my is_page conditionals like this: is_page(’42’)
    I see [here](http://codex.wordpress.org/Conditional_Tags)
   that I should not have the apostrophes in there. (Strange that it always worked
   fine that way, though.
 * Anyway, on that link, it’s hard to tell but it looks like there’s a space between
   the ( and the number, like this: is_page( 42 ) Is that correct, or should it 
   be like this: is_page(42) ?
 *  [Mike](https://wordpress.org/support/users/maddogmike/)
 * (@maddogmike)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/causes-php-error/#post-3514649)
 * OK, I was able to clear the issue. In case it helps anyone else, it turns out
   the is_page conditional will work with or without apostrophes, and with our without
   spaces. It wil not, however, work with just one apostrophe! I had one conditional
   statement like this: is_page(’42)
 * The fix is either to add the closing apostrophe or delete the opening one.

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

The topic ‘Causes PHP 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
 * 3 participants
 * Last reply from: [Mike](https://wordpress.org/support/users/maddogmike/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/causes-php-error/#post-3514649)
 * Status: resolved