Home › Forums › Ticket Products › Event Tickets Plus › Warning: in_array() expects parameter 2 to be array, null given
- This topic has 7 replies, 4 voices, and was last updated 8 years, 3 months ago by Geoff.
-
AuthorPosts
-
January 5, 2016 at 8:56 pm #1050853Kevin MortonParticipant
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
January 6, 2016 at 3:37 pm #1051474Kevin MortonParticipantI 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/
January 6, 2016 at 11:08 pm #1051620Geoff B.MemberGood 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.
January 6, 2016 at 11:54 pm #1051631Kevin MortonParticipantThis reply is private.
January 7, 2016 at 10:59 pm #1052289Geoff B.MemberGood 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.
January 9, 2016 at 10:12 am #1053220Geoff B.MemberGood 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.
February 18, 2016 at 8:34 am #1076638Support DroidKeymasterThis 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.February 18, 2016 at 10:15 am #1077178GeoffMemberHey 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 -
AuthorPosts
- The topic ‘Warning: in_array() expects parameter 2 to be array, null given’ is closed to new replies.