• Resolved aduwow

    (@aduwow)


    Hello,

    I encountered several PHP 8.5 deprecated warnings while editing posts in WordPress admin.

    Environment:

    • WordPress: latest version
    • PHP: 8.5
    • Plugin: Yoast SEO

    Warnings:

    Deprecated: Using null as an array offset is deprecated
    

    Locations:

    wp-content/plugins/wordpress-seo/src/memoizers/meta-tags-context-memoizer.php:135
    wp-content/plugins/wordpress-seo/src/memoizers/meta-tags-context-memoizer.php:154
    wp-content/plugins/wordpress-seo/src/memoizers/meta-tags-context-memoizer.php:157
    
    wp-content/plugins/wordpress-seo/src/memoizers/presentation-memoizer.php:49
    wp-content/plugins/wordpress-seo/src/memoizers/presentation-memoizer.php:63
    wp-content/plugins/wordpress-seo/src/memoizers/presentation-memoizer.php:66
    

    The warnings appear when opening the post editor:

    /wp-admin/post.php?post=XXXX&action=edit
    

    It looks like some memoized values may become null and are later accessed as arrays without validation.

    PHP 8.5 now raises deprecation notices for this behavior.

    You may want to add stricter null/type checks before accessing array offsets.

    Thanks for your work on the plugin.

Viewing 1 replies (of 1 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @aduwow,

    Thanks for using Yoast SEO and reaching out about the depreciation notices. Since deprecations are not errors, they should not be treated as such. Deprecations don’t break any WordPress functionality and are not actual errors. You can safely ignore them. Our development team will fix deprecated messages subsequently.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.