WordPress.org

Support

Support » Plugins and Hacks » Widget Logic » widget logic not working after updating to WP 3.5 AND rolling back to 0.54

widget logic not working after updating to WP 3.5 AND rolling back to 0.54

  • I read the other post (for 0.56 ) that said to roll back to 0.54, but I am still getting warning errors all over my site. Deactivated, reactived, cleared cache etc…
    How do i get rid of these all over the my site?

    Warning: in_array() [function.in-array]: Wrong datatype for second argument in /hermes/bosweb/web077/xxxxx/xxxxx/public_html/domain/www/new/wp-content/plugins/widget-logic/widget_logic.php(284) : eval()’d code on line 1

    Warning: in_array() [function.in-array]: Wrong datatype for second argument in /hermes/bosweb/web077/xxxxx/xxxxx/public_html/domain/www/new/wp-content/plugins/widget-logic/widget_logic.php(284) : eval()’d code on line 1

    thanks

    http://wordpress.org/extend/plugins/widget-logic/

Viewing 1 replies (of 1 total)
  • Plugin Author alanft

    @alanft

    You should definitely be on 0.56 with WP 3.5, but there was a change in WP3.5 on a few functions.

    It is likely you have widgets using the WP function get_post_ancestors as the 2nd param of in_array. This produces the “Wrong datatype for second argument” error when get_post_ancestors returns false.

    You will have to adapt your code slightly eg from

    global $post; return (in_array(77,get_post_ancestors($post)));

    to

    global $post; return ($post) && (in_array(77,get_post_ancestors($post)));

    which returns false as soon as $post is false before trying the second half of the function.

Viewing 1 replies (of 1 total)
  • The topic ‘widget logic not working after updating to WP 3.5 AND rolling back to 0.54’ is closed to new replies.
Skip to toolbar