Yoast SEO
[Plugin: WordPress SEO by Yoast] gives notice when searching (1 post)

  1. remyvv
    Posted 3 years ago #

    WordPress version: 3.4.2
    WordPress SEO version:

    I did this: I installed the plugin ;)

    I expected the plugin to do this: Optimize SEO and stuff..

    Instead it did this:

    If a search doesn't give posts back, i get an Notice from php saying:
    Notice: Trying to get property of non-object in /var/www/wptest.local/httpdocs/wp-includes/post-template.php on line 30

    I traced it back to the wpseo-functions.php file and changed line 14 from this:
    if ( $postid === 0 ) {
    to this:
    if ( $postid === 0 || $postid === '' ) {

    Which made the notice disappear.


Topic Closed

This topic has been closed to new replies.

About this Plugin

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

About this Topic


No tags yet.