Improve handling for WP_Error objects in get_the_terms().

`wp_get_object_terms()` can return a `WP_Error` object. As such, the
`get_the_terms()` cache wrapper should handle them properly. To wit:

* Don't try to map an error object to `get_term()`. Introduced in [35032].
* Don't cache an error object as taxonomy relationships. Introduced in at least [16487], maybe earlier.

Props stephenharris.
Fixes #34723.
Built from https://develop.svn.wordpress.org/trunk@35850


git-svn-id: http://core.svn.wordpress.org/trunk@35814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges
2015-12-10 03:35:27 +00:00
parent 6fd3c9fc64
commit 812060f940
2 changed files with 10 additions and 6 deletions

View File

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