• Resolved WebmasterVPU

    (@webmastervpu)


    Dear all,

    when I run WordPress in debug mode, I receive a significant amount of PHP notices: Trying to get property of non-object in […]/wp-content/plugins/collapsed-archives/collapsed-archives.php on line 80.

    I think there should an “IsSet” check before using “!$r[‘never_expand’]”.

    Thanks and best regards!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,
    I’m getting the exact same notice in my error log.
    Thanks for fixing, but the error is about ‘ID’, so I would go for something like:

    if ( isset( $wp_query->post->ID ) ) {
    	if ( !$r['never_expand'] && ( ( $result->year == get_the_date('Y', $wp_query->post->ID) && !is_page() ) || ( is_page() && $result->year == date('Y') ) ) ) {
    		$output .= ' checked';
    	}
    }

    Pascal.

    Plugin Author Matthew Petroff

    (@petroffm)

    Fixed in v1.5.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trying to get property of non-object in line 80’ is closed to new replies.