• Resolved jan.mazanek

    (@janmazanek)


    I have 2 similar installations with Yoast SEO 22.2 and one of these started to produce in PHP error.log:

    PHP Fatal error: Uncaught TypeError: stripslashes(): Argument #1 ($string) must be of type string, array given in …/wp-content/plugins/wordpress-seo/src/presenters/meta-description-presenter.php:60

    HotFix for this is to replace this row of code with:

    if(is_string($meta_description)) {
    $meta_description = $this->helpers->string->strip_all_tags( \stripslashes( $meta_description ) );
    }elseif(is_array($meta_description)) {
    foreach($meta_description AS $key => $value) {
    $meta_description = [$key] = $this->helpers->string->strip_all_tags( \stripslashes( $value ) );
    }
    }else{
    // Todo…
    }

    The installation is running at WordPress 6.4.3 with custom child Theme based on Avada 7.11.6

    It you find this to be an Yoast SEO plugin issue, I will be pleased with regular fix of this problem directly inside Yoast SEO plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hi @janmazanek,

    Thanks for using the Yoast SEO plugin and sharing that hotfix. We always encourage our users to contribute to our plugin, not just by submitting issues but also by submitting patches. You can submit this on GitHub, and we’ll gladly include it after some code review.

    Plugin Support Mushrit Shabnam

    (@611shabnam)

    We are going ahead and mark this topic as resolved due to inactivity. If you require any further assistance, feel free to create a new topic. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘HotFix for: /src/presenters/meta-description-presenter.php:60’ is closed to new replies.