Warning: number_format() expects parameter 1 to be double

I get the following warning on my new events page:

Warning: number_format() expects parameter 1 to be double, string given in /home/hungryaz/public_html/wp-content/plugins/events-and-bookings/lib/class_eab_template.php on line 489

What parameter do I need to change??



  • mort3n
    • The Crimson Coder

    Hi larry_levenson,

    Is the error showing for a particular event?

    The code in that file on that line is

    $amount = number_format($event->get_price(), 2);

    so it is the price of your event that seems to be a string rather than a valid number.

    Try to edit the price of your event. Could be a comma instead of a dot :slight_smile:



  • aecnu
    • WP Unicorn

    Greetings Larry,

    Welcome to WPMU DEV!

    Sorry to see that you are having an issue with the Events+ plugin.

    Mort3n is spot on with the suggestion that this could be being caused by an unintended character in the price.

    Check on this possibility and let us know.

    Please advise.

    Cheers, Joe

  • Tom Eagles
    • Syntax Hero

    Hiya, just going through some of the older threads here.

    As it’s been a little while since we last heard from you I thought I’d check in to see how you’re going?

    If you’re still looking for some further assistance with this thread then please feel free to reopen the thread or of course for any new and related issues you are most welcome to open a new thread.



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.