• breakoftheec

    (@breakoftheec)


    Plugin version 1.2.1

    I’m getting this error:

    Warning: uasort() expects parameter 1 to be array, null given in C:\xampp\htdocs\webfolder\wp-content\plugins\wp-advertize-it\classes\wp-advertize-it.php on line 306

    Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\webfolder\wp-content\plugins\wp-advertize-it\classes\wp-advertize-it.php on line 307

    It shows on a sidebar that doesn’t even have the widget.
    Any ideas?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Alexander Herdt

    (@alexanderherdt)

    Can you put the line:
    if (!isset($ads_list)) $ads_list = array();
    after:
    function buffer_end()
    {
    //ob_end_flush();
    global $ads_list;

    in wp-advertize-it.php? This should solve the issue.

    Some more questions (to be able to reproduce):
    Do you have defined blocks?
    What is configured as “Max. number of displayed ads”?
    Did you used the widget?

    Thanks.

    Thread Starter breakoftheec

    (@breakoftheec)

    Yes that fixed it.
    What will happen when or if there’s an update of the plugin?

    For debugging:

    I’m just using a couple of Image Ad widgets on the header and a sidebar.
    The warning shows on a sidebar that has no Widget from this plugin.

    The message even shows when there are no Widgets (Image AD or Ad Block) being used at all.

    No defined blocks.
    Max number of displayed ads 0

    Thread Starter breakoftheec

    (@breakoftheec)

    Doing some quick tests right now I just noticed something.

    The warning only shows when a widget from the ULTIMATE POSTS WIDGET plugin is being used
    https://www.ads-software.com/plugins/ultimate-posts-widget/
    It shows right on top of it.

    The strange thing is that I have 3 instances of this same widget being used on the same page, and it only shows on 1 of the instances (I think the last one being loaded).
    If I leave only 1 instance, then it show there.

    Hope this helps.

    Plugin Author Alexander Herdt

    (@alexanderherdt)

    > What will happen when or if there’s an update of the plugin?
    We will fix the issue.
    However, still can’t reproduce the error…Installed the ultimate post widget, configured like you did. Everything is working. Will try again tomorrow.

    Thread Starter breakoftheec

    (@breakoftheec)

    Thanks.
    I wish I had more time right now to do some more testing and see what’s the “combo” that’s making this happen.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Strange Error’ is closed to new replies.