WordPress.org

Forums

WordPress SEO by Yoast
[resolved] Multiple vars in URL returns fatal error (4 posts)

  1. Hiranthi
    Member
    Posted 4 years ago #

    I'm using a custom search page, which results in multiple get-vars in my URL. I had it all in one array ('s'), but decided not to use it like that anymore. I changed all names in the form, test a new search and the result was a fatal error:

    PHP Catchable fatal error: Object of class WP_Error could not be converted to string in /.../wp-content/plugins/wordpress-seo/frontend/class-frontend.php on line 330

    Line 330 is:

    echo "\t".'<link rel="canonical" href="'.$canonical.'" />'."\n";

    And a PHP warning (just before the fatal error, got this one twice):

    PHP Warning: preg_split() expects parameter 2 to be string, array given in /.../wp-includes/query.php on line 1677

    I don't have the Redirect ugly URL's to clean permalinks. option enabled. The only Permalink option I have enabled is Enforce a trailing slash on all category and tag URL's.

    Once I deactivated the plugin the page loaded fine again.

  2. Hiranthi
    Member
    Posted 4 years ago #

    Apparently there's a setting in the WordPress SEO plugin with which you can enable/disable the use of vars in the URL.

  3. gfors
    Member
    Posted 4 years ago #

    Any idea where this setting is? I've looked everywhere and tried every setting.

    I'm having the same problem when passing multiple URL variables. I've switched of every setting in the plugin but nothing works. The only thing that works is disabling WordPress SEO all together.

  4. Barukar
    Member
    Posted 4 years ago #

    I also get the same error message!

    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/bkbus546/public_html/classinoiva.com.br/wp-content/plugins/wordpress-seo/frontend/class-frontend.php on line 377

    This discussion is marked as resolved but I'm not seeing the solution to this problem. Anyone have any suggestions?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress SEO by Yoast
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic