• Resolved jahrat

    (@jahrat)


    Hello support,

    I have a constant error in my logs for the below:
    PHP Fatal error: Uncaught TypeError: ltrim(): Argument #1 ($string) must be of type string, array given in /…/wp-includes/formatting.php:4477
    thrown in /…/wp-includes/formatting.php on line 4477

    Using Query Monitor to try to trace this the only reference I can find is:
    trim(): Passing null to parameter #1 ($string) of type string is deprecated

    With the paths:
    wp-content/plugins/the-events-calendar/common/vendor/vendor-prefixed/stellarwp/db/src/DB/QueryBuilder/Clauses/From.php:33
    wp-content/plugins/the-events-calendar/common/vendor/vendor-prefixed/stellarwp/db/src/DB/QueryBuilder/Clauses/Select.php:31

    These register as generated by Plugin: the-events-calendar

    I need your assistance to fix this error. If you need additional details please let me know.
    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support iammarta

    (@iammarta)

    Hi @jahrat,

    Thanks for reaching out!

    Is The Events Calendar up to date? If not, please update our plugin to the latest version and let us know if you’re still having the same issue.

    As always, we recommend testing updates on a staging site first.

    Best regards,
    Marta

    Thread Starter jahrat

    (@jahrat)

    My plugin is at version 6.2.4 and the error persist.

    Plugin Support Abz

    (@abzlevelup)

    Hi @jahrat, thanks for bringing this to our attention. A bit more information will definitely help, seems like you shared only a summary of the error log . Can you share with us the entire log with the Fatal Error? I’m curious since this one shouldn’t cause a fatal error. Something unexpected happening there. Also can you share which PHP and WordPress version are you using.

    I suspect there’s a conflict that’s causing the issue here as well. It would be good Testing for Conflicts. To be safe, we’d recommend conducting tests and updates on a Staging Server. Also, please keep a working backup of your website.

    Thank you so much.

    Thread Starter jahrat

    (@jahrat)

    Hello @abzlevelup,

    I went through the conflict testing and the only plugin that stopped the error was Event Calendar. I changed to a generic Word Press theme (twenty-twenty) and it did not help. I disabled all my plugins (one at a time over several weeks) and none helped. I am running WordPress 6.3.2 and PHP 8.2.5. The full log is below.

    [23-Oct-2023 16:39:20 UTC] PHP Fatal error: Uncaught TypeError: ltrim(): Argument #1 ($string) must be of type string, array given in /…/wp-includes/formatting.php:4477
    Stack trace:

    0 /…/wp-includes/formatting.php(4477): ltrim(Array)
    1 /…/wp-content/plugins/jetpack/functions.opengraph.php(261): esc_url(Array)
    2 /…/wp-includes/class-wp-hook.php(310): jetpack_og_tags(”)
    3 /…/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array)
    4 /…/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    5 /…/wp-includes/general-template.php(3053): do_action(‘wp_head’)
    6 /…/wp-content/themes/kadence/header.php(24): wp_head()
    7 /…/wp-includes/template.php(785): require_once(‘/home/dh_27ci95…’)
    8 /…/wp-includes/template.php(720): load_template(‘/home/dh_27ci95…’, true, Array)
    9 /…/wp-includes/general-template.php(48): locate_template(Array, true, true, Array)
    10 /…/wp-content/themes/kadence/tribe/events/v2/default-template.php(17): get_header()
    11 /…/wp-includes/template-loader.php(106): include(‘/home/dh_27ci95…’)
    12 /…/wp-blog-header.php(19): require_once(‘/home/dh_27ci95…’)
    13 /…/index.php(17): require(‘/home/dh_27ci95…’)
    14 {main}
    thrown in /…/wp-includes/formatting.php on line 4477

    Plugin Support iammarta

    (@iammarta)

    Hi @jahrat,

    Our plugins are mostly compatible with PHP 8.1, but we’re currently not fully compatible with PHP 8.2. Please check out this link: https://theeventscalendar.com/known-issues/#php8-compatibility.

    Can you try downgrading your PHP version and let us know how it goes?

    Best regards,
    Marta

    Thread Starter jahrat

    (@jahrat)

    Hello @iammarta,

    I am closing this ticket for now as I may not get back to this in the near term. This is only an error seen in my logs and does not so far affect the functionality of my site. When additional information is available I will raise a new ticket.

    Plugin Support Guga Alves

    (@gugaalves)

    Hi @jahrat,

    We’re happy to inform you that this issue has been fixed.

    As always, we recommend testing updates on a staging site first and keeping a recent backup, but the update should work smoothly.

    Please upgrade your Events Calendar plugin to apply this fix to your site.

    Best regards,

    Thread Starter jahrat

    (@jahrat)

    Hello @gugaalves,

    I have installed the update and will let you know if the fault still exists.

    Plugin Support Darian

    (@d0153)

    Hi @jahrat

    Please do not hesitate to start a new thread if you have other issues at all. This allows us to track topics/issues efficiently and follow the WordPress Forum Guidelines.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘PHP Fatal Error – Trim’ is closed to new replies.