Title: Error: widget_logic.php(286) : eval()&#039;d code on line 1
Last modified: August 21, 2016

---

# Error: widget_logic.php(286) : eval()'d code on line 1

 *  [JT](https://wordpress.org/support/users/jtripp81/)
 * (@jtripp81)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/error-widget_logicphp286-evald-code-on-line-1/)
 * I’ve read some of the previous post regarding this error, but I wasn’t able to
   find a solution to my problem.
 * I am in a situation where I am using a lot of widgets and it’s causing my site
   to crash. The widget admin error is even freezing and not allowing me to edit/
   expand them. Any ideas on what may be happening? I just recently started experiencing
   this.
 * Error log is reporting this:
 * PHP Parse error: syntax error, unexpected ‘}’ in /home/content/50/10268050/html/
   wp/betasite/wp-content/plugins/widget-logic/widget_logic.php(286) : eval()’d 
   code on line 1
 * You’ll notice on my site that it’s not loading properly at the bottom.
 * [http://lichange.org/wp/betasite/](http://lichange.org/wp/betasite/)
 * Screenshot of the error:
 * > [View post on imgur.com](https://imgur.com/gGs3ZWG)
 * I am using 3.9.1, but I was using 3.9 and it was still experiencing the same 
   issue.
 * Thanks for any help with this!
 * [https://wordpress.org/plugins/widget-logic/](https://wordpress.org/plugins/widget-logic/)

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

 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/error-widget_logicphp286-evald-code-on-line-1/#post-5099145)
 * the error is caused by the execution of the WL code you’ve put in against one
   of your widgets. one method of troubleshooting is to save out the WL config and
   then check each widget in turn, clear the text out of each one and save until
   the error goes.
 *  Thread Starter [JT](https://wordpress.org/support/users/jtripp81/)
 * (@jtripp81)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/error-widget_logicphp286-evald-code-on-line-1/#post-5099146)
 * Thanks for the quick response!
 * I am not sure what you mean with both parts.
 * Save out? Temporarily remove it from the server? Deactivate it?
 *  [hwoolmington](https://wordpress.org/support/users/hwoolmington/)
 * (@hwoolmington)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/error-widget_logicphp286-evald-code-on-line-1/#post-5099149)
 * Hi, I’m not going to pretend to know much here, but I think I may be having the
   same problem. I’m hosted on WPengine and after chatting with their support they
   seem to think it’s an issue with this plugin, but an easy fix? Anyway, here’s
   the error:
 * “[Mon Jul 14 18:29:30 2014] [error] [client 66.249.90.171] PHP Parse error: syntax
   error, unexpected $end in /nas/wp/www/cluster-1025/jumpstartmd/wp-content/plugins/
   widget-logic/widget_logic.php(286) : eval()’d code on line 1”
 * If it’s helpful, the reason I started investigating this was google was denying
   my Ad requests because it’s bots were getting 500 errors on pages that were (
   seemingly) loading just fine. Deactivating this plugin has resolved that problem.
 * Thank you for your help – I hope this is useful
 *  Thread Starter [JT](https://wordpress.org/support/users/jtripp81/)
 * (@jtripp81)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/error-widget_logicphp286-evald-code-on-line-1/#post-5099156)
 * I just deactivated the plugin and the admin widget area isn’t frozen. If that
   helps in regards to the troubleshooting.
 *  Thread Starter [JT](https://wordpress.org/support/users/jtripp81/)
 * (@jtripp81)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/error-widget_logicphp286-evald-code-on-line-1/#post-5099234)
 * Just another note. I just went through every widget and verified that they all
   say “is_page(xxx)”. Could this be a widget_content issue, meaning could there
   be an error (in my code) in one of my post that may be causing this?
 *  [kmedia](https://wordpress.org/support/users/kmedia/)
 * (@kmedia)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/error-widget_logicphp286-evald-code-on-line-1/#post-5099236)
 * yahhh ! [@jtripp81](https://wordpress.org/support/users/jtripp81/) : you can 
   remove “}” on your Widget logic input.
    exp : i use “is_category( ‘9’ );” ->>
   error. when use “is_category( ‘9’ )”. “clear the text out of each one and save
   until the error goes”
 *  Thread Starter [JT](https://wordpress.org/support/users/jtripp81/)
 * (@jtripp81)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/error-widget_logicphp286-evald-code-on-line-1/#post-5099237)
 * I am not using this character “}” for any of them though. Was that a typo on 
   your part? Also do I need an exclamation point at the beginning of the code in
   the widget logic like this: !is_page(xx)? How about single quotes around the 
   number?
 * Thanks!
 *  [mrarie](https://wordpress.org/support/users/mrarie/)
 * (@mrarie)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-widget_logicphp286-evald-code-on-line-1/#post-5099282)
 * Same problem here:
 * Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ‘)’
   in /xxxxxx/xxxxxx/xxxxxx/wp-content/plugins/widget_logic/widget_logic.php(168):
   eval()’d code on line 1
 * Is there any solution for this?
 *  [asw](https://wordpress.org/support/users/astreetweb/)
 * (@astreetweb)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-widget_logicphp286-evald-code-on-line-1/#post-5099325)
 * What alanft is getting at is that the cause of the problem could be an error 
   in the widget logic syntax on one of your widgets.
 * For instance, I got this error on one of my websites because I put
 * `is_page( array( 4,6,7' ) )`
    (extra apostrophe after the 7) It should be
 * `is_page( array( 4,6,7 ) )`
 * alanft is suggesting you check the widget logic setting for each of your widgets
   to make sure there are no errors. For help in figuring out the correct syntax,
   see this page:
 * [http://codex.wordpress.org/Conditional_Tags](http://codex.wordpress.org/Conditional_Tags)
 * A syntax error in just one of your widgets will cause all of them to display 
   the error message.

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

The topic ‘Error: widget_logic.php(286) : eval()'d code on line 1’ 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/)

 * 9 replies
 * 6 participants
 * Last reply from: [asw](https://wordpress.org/support/users/astreetweb/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/error-widget_logicphp286-evald-code-on-line-1/#post-5099325)
 * Status: not resolved