Support » Plugin: Easy Heads Up Bar » Not Working with Current WP

  • Does not work with the latest version of WordPress. Scripts are loaded but nothing displays or get ejected on the front end.

Viewing 6 replies - 1 through 6 (of 6 total)
  • I just came into this problem and fixed it by editing the plugin file located in wp-content/plugins/easy-heads-up-bar/lib/ehb-frontend.php

    I changed line 24:
    $bar_array = "";

    To this:
    $bar_array = array();

    Of course you should never edit plugin files as your changes will be overwritten with any future plugin updates. However, since it’s been a couple of years since this plugin has issued an update, I think you will be safe. And hopefully this bug will be fixed if any updates are rolled out.

    As you can see the problem is that the type of variable is cast as a string, but it is used as an array later in the code. Interstingly enough, this bug only came to light when I moved my site to a new server. This bug must only affect certain PHP versions and/or server configurations.

    Had the same issue. This fixed the problem. Thank you for posting!

    I got my site to come back up by modifying the $bar_array variable as suggested, but I’m still getting the following error:

    Warning: count(): Parameter must be an array or an object that implements Countable in /public_html/ on line 746

    Here’s the offending line in init.php:

    // if it’s an array of one, extract it
    elseif ( is_array( $meta_box[‘pages’] ) && count( $meta_box[‘pages’] === 1 ) )

    Any suggestions on how to modify this so it will work?


    thanks, @prunly for the fix.

    @mikegratten, changeing that line fixes that php warning/code bug.
    elseif ( is_array( $meta_box[‘pages’] ) && count( $meta_box[‘pages’] ) === 1 )

    Hello guys,

    Thanks in advance for sharing this. Been using this plugin for a while and realy like it.

    Hope all bugs could be fixed for further use :).

    @tmuka thanks for the suggestion, but it still didn’t fix the problem.
    I got this error.
    Warning: Use of undefined constant ‘pages’ – assumed ‘‘pages’’ (this will throw an Error in a future version of PHP) in /customers/d/5/c/ on line 746

    All best.

    that warning (not an error) suggests the single quotes probably didn’t copy/paste correctly. try trying double quotes around both occurrences of page instead. hope this helps!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Not Working with Current WP’ is closed to new replies.