Support » Plugin: Events Manager » [Plugin: Events Manager]Warning: get_class() expects parameter 1 to be object

  • Resolved Rnt-X

    (@rnt-x)


    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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • agelonwl

    (@angelonwl)

    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.

    Rnt-X

    (@rnt-x)

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

    Rnt-X

    (@rnt-x)

    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.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

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

    Rnt-X

    (@rnt-x)

    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.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    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.

    agelonwl

    (@angelonwl)

    hi Rnt-X,

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

    agelonwl

    (@angelonwl)

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

    Rnt-X

    (@rnt-x)

    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.

    gkwyc

    (@gkwyc)

    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

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Events Manager]Warning: get_class() expects parameter 1 to be object’ is closed to new replies.