[wp-trac] [WordPress Trac] #37291: Check for WP_Error before echo in the_tags()
WordPress Trac
noreply at wordpress.org
Mon Jul 18 22:10:25 UTC 2016
#37291: Check for WP_Error before echo in the_tags()
-------------------------------------+-----------------------------
Reporter: michalzuber | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Taxonomy | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-refresh | Focuses:
-------------------------------------+-----------------------------
Changes (by ocean90):
* keywords: => has-patch needs-refresh
* version: trunk =>
* milestone: Awaiting Review => Future Release
Comment:
@michalzuber What's the code/message of the `WP_Error` object?
WordPress uses [https://make.wordpress.org/core/handbook/best-practices
/coding-standards/php/#indentation tabs for indentation]. I think the
following would be more readable:
{{{
$tags = get_the_tag_list( $before, $sep, $after );
if ( is_wp_error( $tags ) ) {
return '';
}
return $tags;
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37291#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list