[wp-trac] [WordPress Trac] #20633: wp-includes/comment.php:738 - Undefined property: WP_Query::$comments
WordPress Trac
noreply at wordpress.org
Tue Mar 12 18:48:55 UTC 2013
#20633: wp-includes/comment.php:738 - Undefined property: WP_Query::$comments
------------------------------------+------------------------------
Reporter: markjaquith | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Warnings/Notices | Version: 3.3.2
Severity: normal | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+------------------------------
Changes (by DrewAPicture):
* keywords: has-patch => has-patch dev-feedback
Comment:
Replying to [comment:4 kitchin]:
> Suggest:
> {{{
> - if ( !$comments || !is_array($comments) )
> + if ( empty($comments) || !is_array($comments) ) {
> + if (empty( $wp_query->comments ) )
> + return 0;
> $comments = $wp_query->comments;
> + }
> - if ( empty($comments) )
> - return 0;
> }}}
Would you like to
[http://make.wordpress.org/core/handbook/submitting-a-patch/ submit] an
updated patch?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20633#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list