WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[Plugin WordPress SEO by Yoast][Bug+fix] Trying to get property of non-object (1 post)

  1. jrf
    Member
    Posted 1 year ago #

    Hiya,

    Love the plugin, but encountered a notice while running in debug (in a test environment).

    WP 3.4.2
    WordPress SEO 1.2.8.4
    PHP 5.2.9

    When reqesting a category/tag/archive/search/404 page, the following error notice gets generated in the <title> tag:

    Notice: Trying to get property of non-object in /path/to/site/wp-includes/post-template.php on line 30

    Here's the fix:

    File: wordpress-seo/inc/wpseo-functions.php
    Line 14:
    if ( $postid === 0 ) {
    replace with:
    if ( $postid === 0 || $postid === '' )

    Hope this helps & keep up the good work!

    Smile,
    Juliette

    http://wordpress.org/extend/plugins/wordpress-seo/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic