Changeset 38346 for branches/4.6
- Timestamp:
- 08/24/2016 09:19:49 AM (8 years ago)
- Location:
- branches/4.6
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.6
-
branches/4.6/src/wp-includes/taxonomy.php
r38162 r38346 4275 4275 if ( false === $object_terms ) { 4276 4276 $object_terms = wp_get_object_terms( $object_id, $taxonomy, array( 'update_term_meta_cache' => false ) ); 4277 if ( is_wp_error( $object_terms ) ) { 4278 return $object_terms; 4279 } 4280 4277 4281 wp_cache_set( $object_id, wp_list_pluck( $object_terms, 'term_id' ), "{$taxonomy}_relationships" ); 4278 4282 } -
branches/4.6/tests/phpunit/tests/term/isObjectInTerm.php
r35242 r38346 147 147 $this->assertSame( $num_queries, $wpdb->num_queries ); 148 148 } 149 150 /** 151 * @ticket 37721 152 */ 153 public function test_invalid_taxonomy_should_return_wp_error_object() { 154 $this->assertWPError( is_object_in_term( 12345, 'foo', 'bar' ) ); 155 } 149 156 }
Note: See TracChangeset
for help on using the changeset viewer.