Forums

Widget Logic Array Warning/ Error (2 posts)

  1. blueyonder
    Member
    Posted 2 years ago #

    I am getting the following warning on the top of my site:

    Warning: array_push() [function.array-push]: First argument should be an array in /wp-content/plugins/widget-logic/widget_logic.php on line 138

    Widget logic is working fine though, but is giving the error. Any ideas what to do?

    Thanks!

  2. alanft
    Member
    Posted 2 years ago #

    it suggests that you have a misbehaving widget somewhere. all the widgets in the main WP code are OK, so it must be from a plugin or widget code in your theme.

    try deactivating widget-providing plugins one at a time. and if your theme provides widgets, try switching temporarily to the default WP theme to see if that helps.

    alternatively if you are up to some hacking of my plugin you could try changing line 137 to

    if (!$wp_registered_widgets[$id]['callback_wl_redirect'] && array_key_exists('params',$wp_registered_widgets[$id]) )

    however that won't fix the misbehaving widget, so it's appearance won't be controlled by widget logic, but it will stop the error appearing.

    i'd be interested to see the code of the problematic widget so that i can make it work tho. so let me know.

Topic Closed

This topic has been closed to new replies.

About this Topic