Viewing 6 replies - 1 through 6 (of 6 total)
  • What exactly does line 1 look like in widget_logic.php? There should be no eval command there, so this could be a sign that your wordpress install has been hacked and some files (probably not only in the widget_logic plugin) have been altered to contain a eval(somecode) line which executes malicious code…

    The plugin clearly says it evaluates Your code, the error is on line 1 of what SRD75 (or Someone) put it. The error is not line 1 of the plugin, it is triggered at line 286 of the plugin.

    You have to use valid PHP, and it has to return a true/false result; RTFM.

    If anyone puts HTML in that field, the angle bracket will cause a PHP Fatal Error; you may have to remove it in phpMyAdmin == Don’t!

    The whole field is a security risk, since you can eval() a string that has malicious contents…

    yes, the original poster has invalid PHP in one of their widget logic fields somewhere.

    This caught me out too. In my case I had this in a widget logic:

    is_page(123);

    It should be:

    is_page(123)

    Some validation on the widget logic field would be a nice addition.

    How can that be corrected because on my widget.php page I have added a widget in an area but have put a wrong code, but in that area the widget is not visible anymore hence cannot correct or delete the code.

    @panthony54, If you can’t see the widget configuration, you’ll have to edit the bad code via phpMyAdmin (or whatever MySQL editing tool you use).

    select * from wp_options where option_name like ‘%widget_logic%’

    Once you’ve seen the records, you can edit the ones with bad code in them. Warning: Errors in editing the MySQL database directly, can cause “big problems”. If you’re not knowledgeable about phpMyAdmin, Keep Out; find someone who is.

    Basically, the Widget Logic plugin has no error checking, no debugging, no way of removing bad entries. That whole box where you should put valid PHP allows invalid PHP, or HTML, or anything else. Either never use that box, or find another plugin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘unexpected ';' in widget_logic.php’ is closed to new replies.