[wp-trac] [WordPress Trac] #20633: wp-includes/comment.php:738 - Undefined property: WP_Query::$comments
WordPress Trac
noreply at wordpress.org
Mon Sep 30 18:33:38 UTC 2013
#20633: wp-includes/comment.php:738 - Undefined property: WP_Query::$comments
----------------------------------------+-----------------------------
Reporter: markjaquith | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Warnings/Notices | Version: 3.3.2
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests |
----------------------------------------+-----------------------------
Comment (by kitchin):
As an alternative, here's a one-line fix to stop the WP_DEBUG warning. It
does not change behavior.
{{{
- $comments = $wp_query->comments;
+ $comments = isset( $wp_query->comments ) ?
$wp_query->comments : null;
}}}
I'll make a patch if there's any interest.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20633#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list