WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] arning: get_class() expects parameter 1 to be object (11 posts)

  1. Rnt-X
    Member
    Posted 2 years ago #

    1) For some reason the booking form hangs when I click the "Send your booking"-button. It keeps loading something for ever (although the email is sent). When I check my bookings they are ok, and when I cancel them and go to the booking form again I'll see this warning message as many times as I've tried to send my bookings:

    Warning: get_class() expects parameter 1 to be object, null given in wp-content\plugins\events-manager\classes\em-booking.php on line 330

    Any idea what could be the cause of this?

    2) Any workaround to avoid the same event showing multiple times in "My bookings"? If user first books one space and then cancels it and then he books it again, the same event will show two times in My Bookings. Would work better if the event would be deleted from the database after cancellation.

    Thanks for any possible help.

  2. agelonwl
    Member
    Posted 2 years ago #

    do you have a lot of plugin? and it is possible for you to deactivate those temporarily or try switch to default wp theme? in this way we can know if its a conflict between those theme or plugin.

  3. Rnt-X
    Member
    Posted 2 years ago #

    Deactivated all the plugins, no effect, tested with default theme, no effect.

  4. Rnt-X
    Member
    Posted 2 years ago #

    Answer for my second question was editing em-actions.php file. When user clicks the cancel link, the booking is deleted from the database - makes more sense now. For some reason it still shows the empty table although it should show the message: "You do not have any bookings" if there aren't any bookings. Must be some little bug in counting.

  5. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    i'll check this and fix but you can stop this from happening by disabling your php error reporting (recommended)

  6. Rnt-X
    Member
    Posted 2 years ago #

    I can do it on my wamp server, but not elsewhere. But the problem really is the form hanging (/eternal loading) which causes that warning message, not the message itself.

  7. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    it's a security risk to leave warnings on to the public (plus stuff like this happens), it exposes unnecessary information about your server.

    first thing I'd check though is if this works or not with plugins disabled and/or using the default theme to rule these two possibilities out.

  8. agelonwl
    Member
    Posted 2 years ago #

    hi Rnt-X,

    does email is working? coz' em sends an email on bookings and it might be the cause.

  9. agelonwl
    Member
    Posted 2 years ago #

    i mean maybe the cause of hanging is email related! it might be email timeout related

  10. Rnt-X
    Member
    Posted 2 years ago #

    Emails are sent and bookings are saved just fine. I ran a test on another server and everything worked perfect, so the cause of this problem lies in my Wamp server. Everything else has worked ok by far so gotta check the email settings just to be sure.

    Thank you for your help all.

  11. gkwyc
    Member
    Posted 2 years ago #

    Warning: get_class() expects parameter 1 to be object, null given in C:\wamp\www\nezha\wp-content\plugins\events-manager\classes\em-booking.php on line 330

    Warning: number_format() expects parameter 1 to be double, string given in C:\wamp\www\nezha\wp-content\plugins\events-manager\classes\em-booking.php on line 512

    me too

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic