Taxonomy: Avoid a fatal error in `the_tags()` in the event that `get_the_term_list()` returns a WP_Error.

Props michalzuber.
See #37291.

Built from https://develop.svn.wordpress.org/trunk@38777


git-svn-id: http://core.svn.wordpress.org/trunk@38720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2016-10-11 03:27:31 +00:00
parent e97ab5362b
commit f40c2a62a6
2 changed files with 7 additions and 2 deletions

View File

@ -1142,7 +1142,12 @@ function get_the_tag_list( $before = '', $sep = '', $after = '', $id = 0 ) {
function the_tags( $before = null, $sep = ', ', $after = '' ) {
if ( null === $before )
$before = __('Tags: ');
echo get_the_tag_list($before, $sep, $after);
$the_tags = get_the_tag_list( $before, $sep, $after );
if ( ! is_wp_error( $the_tags ) ) {
echo $the_tags;
}
}
/**

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38776';
$wp_version = '4.7-alpha-38777';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.