[wp-trac] [WordPress Trac] #14581: No magic numbers
WordPress Trac
noreply at wordpress.org
Sat Jun 21 23:25:32 UTC 2014
#14581: No magic numbers
------------------------------------+------------------
Reporter: ryan | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.0
Component: Database | Version:
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+------------------
Comment (by kitchin):
Note you left single quotes on `comment_date_gmt < '%s'"` in `wp-
includes/comment.php` line 1093 (scroll to the right to see it):
{{{
$sql = $wpdb->prepare(
"SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE
comment_post_ID = %d AND comment_parent = 0 AND comment_approved = %s AND
comment_date_gmt < '%s'" . $comtypewhere,
$comment->comment_post_ID,
WP_STATUS_ON,
$comment->comment_date_gmt
);
}}}
Also, ` . $comtypewhere` (scroll right further) is confusing within a
format string, but I guess that's out of scope of this bug.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/14581#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list