[wp-trac] [WordPress Trac] #28009: Recent Posts widget breaks ob stack
WordPress Trac
noreply at wordpress.org
Thu Apr 24 11:13:51 UTC 2014
#28009: Recent Posts widget breaks ob stack
----------------------------+-----------------------------
Reporter: m_i_n | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Widgets | Version: 3.9
Severity: normal | Keywords:
Focuses: administration |
----------------------------+-----------------------------
Please have a look at the following part of "Recent Posts" widget code
(default-widgets.php, from line 731):
{{{
if ( ! $this->is_preview() ) {
$cache[ $args['widget_id'] ] = ob_get_flush();
wp_cache_set( 'widget_recent_posts', $cache, 'widget' );
} else {
ob_flush();
}
}}}
If you're not in is_preview(), output buffer is returned to var, flushed,
and turns output buffering off (it's OK). However, in other case, buffer
in not returned to var, flushed (it's OK until now), but '''output
buffering is not turned off''' (it should be ob_end_flush instead of
ob_flush). It breaks ob stack.
The bug is noticeable in Appearance / Customize, if a theme uses output
buffering on the dynamic_sidebar() function, and the widget is active.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28009>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list