Warning: in_array() expects parameter 2 to be array, null given

Home Forums Ticket Products Event Tickets Plus Warning: in_array() expects parameter 2 to be array, null given

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1050853
    Kevin Morton
    Participant

    Hi Tribe,

    I’m on a development site where we were using your WooCommerce Tickets plugin, and just updated to Event Tickets and Event Tickets Plus according to your instructions. Everything looked fine, except when I went to this homepage I saw this error was outputted 3 times, pushing the homepage slider down:

    Warning: in_array() expects parameter 2 to be array, null given in .../plugins/event-tickets-plus/src/Tribe/Commerce/WooCommerce/Main.php on line 899

    I checked the line, and it’s looking for Tribe__Tickets__Main::instance()->post_types in that space. In Events->Settings->Tickets I have Event checked as a post type to allow tickets for, so I’m assuming that should be the value in the array rather than null that triggers the error.

    Any help is much appreciated. Thanks!

    Kevin

    #1051474
    Kevin Morton
    Participant

    I traced the issue to this function, which I am calling (3 times, hence 3 errors) in my customization: tribe_events_get_ticket_event()

    I am calling it using the ID of a WooCommerce product:

    tribe_events_get_ticket_event($product->ID)

    It was working fine before my update to Event Tickets Plus, but now I am getting the error. It goes away if I comment out my use of that function. Perhaps there’s a bug in the new implementation as it relates to Event Tickets Plus?

    Here’s your current documentation on the function: https://theeventscalendar.com/function/tribe_events_get_ticket_event/

    #1051620
    Geoff B.
    Member

    Good morning Kevin and welcome to the Tribe!

    Thank you for your question and your great troubleshooting skills.

    We are sorry for that unpleasant glitch. The good news is that we will help you get to the bottom of it.

    You are absolutely right, the culprit is the function call in the customization.
    Since we are now hosting all e-commerce solutions under one plugin, there have been a few tweaks in the code that might cause such inconvenience.

    If you don’t mind, the fastest way to correct this would be to have the complete function call code (in a private reply if you prefer).

    Thank you for your understanding and patience.

    Have a great day!

    Geoff B.

    #1051631
    Kevin Morton
    Participant

    This reply is private.

    #1052289
    Geoff B.
    Member

    Good evening Kevin,

    Thank you for providing me with the complete function call.

    Let me run a couple of tests and I will get back to you shortly.

    Have a great day!

    Geoff B.

    #1053220
    Geoff B.
    Member

    Good afternoon Kevin,

    After several tests, it turns out you have indeed found a bug in the new implementation of the Events Ticket Plus.
    Thank you for bringing this to our attention.

    I have opened a bug ticket to address this as soon as possible.
    That being said, to set the proper expectations, at this point we cannot commit to a specific bug resolution date.

    But stay tuned, we will get back to you as soon as we have more details on this topic.

    In the meantime, we apologize for any inconvenience this might be causing and we want to thank you once again for your patience and collaboration.

    Is there anything else I can help you with today ?

    Best regards,

    Geoff B.

    #1076638
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

    #1077178
    Geoff
    Member

    Hey there!

    Just wanted to jump in here and let you know that we released Event Tickets Plus 4.0.5 last night and it included a fix for this issue. Please check your WordPress updates, or you can also grab the latest copy by logging into this site and heading to My Account > Downloads.

    Thanks for your patience while we worked on this! Please feel free to open a new thread if you continue to experience the same issue or have any other questions that pop up during updating and we’d be happy to help. 🙂

    Cheers!
    Geoff

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Warning: in_array() expects parameter 2 to be array, null given’ is closed to new replies.