• Resolved Nino Mihovilic

    (@ninomiho)


    Hi!

    After updating to PHP 8 (any version) I got an error “Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, bool given” in “wp-content/plugins/the-events-calendar/src/functions/template-tags/general.php:504”

    The issue is in the function “tribe_get_event_cat_slugs”, the “get_the_terms” function returns false for while getting terms and that boolean causes a fatal issue in PHP 8+ while being passed in the “array_filter” function.

    To fix this issue a check if the “$terms” variable is false on line 496 should be added.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Darian

    (@d0153)

    Hi @ninomiho

    Thanks for reaching out.

    It seems like you are using PHP 8, which we still currently have incompatibilities with our plugins.?

    See the article here: https://theeventscalendar.com/knowledgebase/k/php-8-support/.

    Could you try downgrading your PHP to PHP 8.0 or 7.4? It would be best to use this version, which we fully support.

    If that doesn’t help, could you provide the version of the following? This will help me understand how your system is set up.

    • PHP
    • WordPress
    • The Events Calendar
    • Theme

    Looking forward to your reply.

    Thread Starter Nino Mihovilic

    (@ninomiho)

    Hi Darian,

    yes we are using PHP 8. But even with the PHP 8.0 version it throws that error.

    • PHP – 8.0
    • WordPress – 6.1.1?
    • The Events Calendar – 6.0.10
    • Theme is custom

    The issue exists because of bad code in that part. The function “get_the_terms” can return false but that is not being checked. I believe that this fix should be added.

    Plugin Support Darian

    (@d0153)

    Hi @ninomiho

    Thanks for your response and for providing additional details.

    I already shared this with the team, and I’ll get back to you once I have hear back from them.

    Let me know if you have other questions or concerns.

    I am having the same exact trouble:

    “Warning: array_filter() expects parameter 1 to be array, bool given in /home/customer/www/mywebsite.com/public_html/wp-content/plugins/the-events-calendar/src/functions/template-tags/general.php on line 504

    It’s only happening when I view an event page that’s in a series.

    I should also add that there is no way to Update a series, so you best get it right at the first hit of the Save button.

    • This reply was modified 1 year, 8 months ago by Jennifer.
    Plugin Support Darian

    (@d0153)

    Hi @ninomiho @jks7152

    Thanks for patiently waiting.

    This looks like a bug in our plugin. We already created an internal bug ticket for this, and I added your case. Thanks for all the details. I will definitely pass it along to our devs.

    I am unable to provide an exact date or time estimate for when this bug will be fixed, but you’ll be notified when there are any updates.

    If you do have other concerns or issues you need help with, please create another thread, as it helps us track different issues.

    @jks7152 It seems you have an active license with us. If you require further assistance, please open a Support Ticket on our Help Desk. This is to follow WordPress Forum Guidelines regarding premium users,

    You’ll hear from one of my colleagues soon!

    Regards,
    Darian


    Internal Bug Ticket Reference:
    TEC-4725

    Plugin Support Guga Alves

    (@gugaalves)

    Hi there,

    We’re back with good news for you.

    The internal bug ticket TEC-4725 was fixed!

    As always, we suggest testing updates on a staging site first and having a recent backup, but it should all be smooth sailing.

    Please update your Events Calendar plugin to apply that fix to your site.

    Best Regards,

    Plugin Support Darian

    (@d0153)

    Hi all.

    This thread has been inactive for a while, so we’ll go ahead and mark it Resolved. Please open a new thread if any other questions arise, and we’d be happy to help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Fatal Error on PHP 8+’ is closed to new replies.