• Resolved nexbridge

    (@nexbridge)


    Here’s the stack trace:

    trim(): Passing null to parameter #1 ($string) of type string is deprecated
    E_DEPRECATED at /wp-content/plugins/wordpress-seo/src/presenters/canonical-presenter.php(49):
    #0 [internal function]: {closure}()
    #1 /wp-content/plugins/wordpress-seo/src/presenters/canonical-presenter.php(49): trim()
    #2 /wp-content/plugins/wordpress-seo/src/presenters/abstract-indexable-tag-presenter.php(37): Yoast\WP\SEO\Presenters\Canonical_Presenter->get()
    #3 /wp-content/plugins/wordpress-seo/src/integrations/front-end-integration.php(395): Yoast\WP\SEO\Presenters\Abstract_Indexable_Tag_Presenter->present()
    #4 /wp-includes/class-wp-hook.php(324): Yoast\WP\SEO\Integrations\Front_End_Integration->present_head()
    #5 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #6 /wp-includes/plugin.php(517): WP_Hook->do_action()
    #7 /wp-content/plugins/wordpress-seo/src/integrations/front-end-integration.php(366): do_action()
    #8 /wp-includes/class-wp-hook.php(324): Yoast\WP\SEO\Integrations\Front_End_Integration->call_wpseo_head()
    #9 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()

    Looks like the following line just needs to be made null-safe:

    return \urldecode( (string) \trim( \apply_filters( 'wpseo_canonical', $this->presentation->canonical, $this->presentation ) ) );

    Whilst I appreciate that deprecation warnings don’t affect functionality, it’s obviously best practice to fix them, and what’s deprecated in one PHP branch usually throws an error in the next one, in which case it will need fixing at some point. I’m using version 24.1 if that helps.

Viewing 1 replies (of 1 total)
  • Suwash

    (@suascat_wp)

    @nexbridge Thank you for bringing this issue to our attention! I’m sorry that our plugin caused a problem on your site. A bug report has been created internally and is under review by our product team.

    What’s next?
    Our product team will assess the severity of the issue and assign a priority level to the report. Our developers work on the highest priority issues first. We cannot give you an estimate of when they’ll start working on the issue.

    If you have any further information that may affect the prioritization or help our development team solve this bug, please feel invited to reply to this forum topic, and we’ll share the information with our product team. Or you can leave a comment or subscribe to the GitHub report to get updates on the issue.

    https://github.com/Yoast/wordpress-seo/issues/21455

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.