Title: Error after Widget Logic upgrade
Last modified: August 20, 2016

---

# Error after Widget Logic upgrade

 *  Resolved [Meginoz](https://wordpress.org/support/users/meginoz/)
 * (@meginoz)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/)
 * I’ve just upgraded the Widget Logic plugin on my local test site, and am seeing
   this error at the top of each page, and everywhere a widget should be:
 * `Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING
   in C:\xampp\htdocs\megansweb2012\wp-content\plugins\widget-logic\widget_logic.
   php(284) : eval()'d code on line 1`
 * I’m guessing it’s something to do with the following item in the Change Log, 
   but it’s a bit above my head what this means.
 * > Added a ‘widget_logic_eval_override’ filter. This allows advanced users to 
   > bypass EVAL with a function of their own.
 * Any idea what this error means, and how I can fix it?
    [http://wordpress.org/extend/plugins/widget-logic/](http://wordpress.org/extend/plugins/widget-logic/)

Viewing 15 replies - 1 through 15 (of 35 total)

1 [2](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/page/2/?output_format=md)

 *  [philibertperusse](https://wordpress.org/support/users/philibertperusse/)
 * (@philibertperusse)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/#post-3293793)
 * I have the exact same issue! Same warning accross the website!
 *  [philibertperusse](https://wordpress.org/support/users/philibertperusse/)
 * (@philibertperusse)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/#post-3293795)
 * I found the issue, it appears that if your condition logic contains quotes, like:
   `
   is_page('about')`
 * then these quotes gets escaped, and then eval tries to eval
    `return (is_page(\'
   about\'))`
 * I patched it by manually modifying widget_logic.php as follows, starting at line
   281:
 *     ```
       if (stristr($wl_value,"return")===false) {
          $wl_value="return (" . $wl_value . ");";
          // Unescape the quotes in $wl_value
          $wl_value=preg_replace("/\\\'/","'", $wl_value);
       }
       ```
   
 * Hopefully the author will fix it and I will just have to overwrite my change.
 *  [godoggydaddy](https://wordpress.org/support/users/godoggydaddy/)
 * (@godoggydaddy)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/#post-3293796)
 * Happened to me as well. For a temp fix I deactivated the plugin, downloaded the
   previous version, 0.52, from the developers page of the plugin at [http://wordpress.org/extend/plugins/widget-logic/developers/](http://wordpress.org/extend/plugins/widget-logic/developers/).
   I then overwrote the new plugin which is located in the wp-content/plugins/widget-
   logic/ directory with the previous plugin and then activated the plugin again.
   That fixes the immediate problem and I will wait until wiser heads than mine 
   figure out the fix. Hope this helps.
 *  [jrstaatsiii](https://wordpress.org/support/users/jrstaatsiii/)
 * (@jrstaatsiii)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/#post-3293797)
 * This happened to us as well. glad to see it is a common error and not something
   we did internally. Widget Logic has had great support in the past, and I’m sure
   we’ll get a patch out ASAP.
 *  [deadhippo](https://wordpress.org/support/users/deadhippo/)
 * (@deadhippo)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/#post-3293800)
 * Me too.
 *  [ElizaTaylor](https://wordpress.org/support/users/elizataylor/)
 * (@elizataylor)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/#post-3293802)
 * I just upgraded the plugin and I’m getting terrible errors all over my website
   too 🙁
    [http://www.spacepops.com/](http://www.spacepops.com/)
 *  [zreNET](https://wordpress.org/support/users/zrenet/)
 * (@zrenet)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/#post-3293805)
 * me too, please fix it
 *  Thread Starter [Meginoz](https://wordpress.org/support/users/meginoz/)
 * (@meginoz)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/#post-3293806)
 * Thanks phil, I guess I’ll just roll back to the old version and wait for the 
   fix.
 *  [khan.shabnam](https://wordpress.org/support/users/khanshabnam/)
 * (@khanshabnam)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/#post-3293814)
 * FIX for wordpress 3.5 version
 * Add following code on line number 58 (in widget_logic_visual_admin_enqueue_script()
   function) in plugins/widget-logic-visual/widget_logic.php
 *     ```
       wp_register_script('jquery.1.7' ,plugin_dir_url(__FILE__).'js/jquery-1.7.1.min.js');
   
       wp_enqueue_script('jquery.1.7');
       ```
   
 * and upload jquery1.7.1.min.js in plugin js folder
    And it works fine for.
 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/#post-3293815)
 * 🙁 I will patch ASAP. Thanks all and apologies. My own site WL doesn’t have any
   strings in it so didn’t catch that
 *  [khan.shabnam](https://wordpress.org/support/users/khanshabnam/)
 * (@khanshabnam)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/#post-3293816)
 * hi alanft
 * Are you using Widget logic Visual plugin?
 * If yes, then open plugins/widget-logic-visual/widget_logic.php and you will find
   widget_logic_visual_admin_enqueue_script() on line number 58.
 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/#post-3293817)
 * i am not – visual is nothing to do with me
 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/#post-3293818)
 * I have tried to roll back the ‘stable tag’ to 0.52, and will have a proper fix
   this evening (GMT)
 *  [khan.shabnam](https://wordpress.org/support/users/khanshabnam/)
 * (@khanshabnam)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/#post-3293819)
 * This solution is for Widget logic Visual plugin. ([http://wordpress.org/extend/plugins/widget-logic-visual/](http://wordpress.org/extend/plugins/widget-logic-visual/))
 * Widget Logic Visual is better than Widget Logic( [http://wordpress.org/extend/plugins/widget-logic/](http://wordpress.org/extend/plugins/widget-logic/))
 * Let me know, when your issues will fix and how.
 *  [Christian Foellmann](https://wordpress.org/support/users/cfoellmann/)
 * (@cfoellmann)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/#post-3293820)
 * [@khan](https://wordpress.org/support/users/khan/).shabnam I did not understand
   your last post.
 * What is better? Widget Logic OR Widget Logic Visual?
    Alanft is the maintainer
   of Widget Logic

Viewing 15 replies - 1 through 15 (of 35 total)

1 [2](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/page/2/?output_format=md)

The topic ‘Error after Widget Logic upgrade’ 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/)

 * 35 replies
 * 16 participants
 * Last reply from: [ElizaTaylor](https://wordpress.org/support/users/elizataylor/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/error-after-widget-logic-upgrade/page/3/#post-3293849)
 * Status: resolved