[wp-trac] [WordPress Trac] #22413: get_the_excerpt() missing a check on $post->post_excerpt
WordPress Trac
noreply at wordpress.org
Mon Nov 12 18:27:33 UTC 2012
#22413: get_the_excerpt() missing a check on $post->post_excerpt
------------------------------+------------------------------
Reporter: johnjamesjacoby | Owner:
Type: defect (bug) | Status: new
Priority: low | Milestone: Awaiting Review
Component: Warnings/Notices | Version:
Severity: minor | Resolution:
Keywords: has-patch |
------------------------------+------------------------------
Comment (by johnjamesjacoby):
Replying to [comment:2 nacin]:
> Under what situation would we have a post object without post_excerpt?
Any situation where a plugin decides to unset it. Whether that's right or
wrong is debatable, either way, it's possible.
> Is that still a valid post object?
It could be? Or it could not be:
{{{
global $post; unset( $post->post_excerpt );
}}}
...and it's still a post object.
> Are these notices we should actually be suppressing, or should
developers see them?
We should suppress them where it makes sense to, and here is one of those
places, since a post_excerpt isn't operation critical to loading a post
(I.E. like a post ID.)
> With 3.5, any WP_Post object will automatically have post_excerpt =
`''`.
Did it not with 3.4? If that's the case, it may already be somewhat of a
non-issue specifically related to Jetpack/bbPress.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22413#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list