Changeset 12223 for trunk/wp-includes/comment.php
- Timestamp:
- 11/19/2009 05:58:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r12183 r12223 133 133 function &get_comment(&$comment, $output = OBJECT) { 134 134 global $wpdb; 135 $null = null; 135 136 136 137 if ( empty($comment) ) { … … 147 148 } elseif ( ! $_comment = wp_cache_get($comment, 'comment') ) { 148 149 $_comment = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment)); 150 if ( ! $_comment ) 151 return $null; 149 152 wp_cache_add($_comment->comment_ID, $_comment, 'comment'); 150 153 }
Note: See TracChangeset
for help on using the changeset viewer.