Opened 19 years ago
Closed 18 years ago
#1517 closed defect (bug) (worksforme)
get_the_excerpt() causes Apache to hang
Reported by: | s_g | Owned by: | skippy |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | major | Version: | 1.5.1 |
Component: | Template | Keywords: | excerpt the_excerpt get_the_excerpt bg|2nd-opinion |
Focuses: | Cc: |
Description
the_excerpt calls get_the_excerpt, which causes Apache to hang. get_the_excerpt tries to apply the filter get_the_excerpt, which it shouldn't. the_excerpt already applies the proper filter (the_excerpt). This should be changed as follows:
function get_the_excerpt($fakeit = true) { global $id, $post; $output = ''; $output = $post->post_excerpt; if (!empty($post->post_password)) { // if there's a password if ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie $output = __('There is no excerpt because this is a protected post.'); return $output; } } return $output; }
If you didn't notice the change:
return apply_filters('get_the_excerpt', $output);
was changed to:
return $output;
Change History (2)
Note: See
TracTickets for help on using
tickets.
wp-includes/default-filters.php line 69 defines a filter to apply on get_the_excerpt:
add_filter('get_the_excerpt', 'wp_trim_excerpt');