Making WordPress.org

Changeset 14062


Ignore:
Timestamp:
09/18/2024 04:52:47 AM (2 years ago)
Author:
dd32
Message:

PHPUnit Test Reporter: Fix a fatal, can't treat a WP_Term object as an array.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/src/class-restapi.php

    r14061 r14062  
    253253
    254254                foreach ( $post_terms as $term ) {
    255                         if ( 'php-version' === $term['taxonomy'] ) {
     255                        if ( 'php-version' === $term->taxonomy ) {
    256256                                $tax_query[] = array(
    257257                                        'taxonomy' => 'php-version',
    258                                         'terms'    => [ $term['term_id'] ],
     258                                        'terms'    => [ $term->term_id ],
    259259                                );
    260260                        }
    261261
    262                         if ( 'db-version' === $term['taxonomy'] ) {
     262                        if ( 'db-version' === $term->taxonomy ) {
    263263                                $tax_query[] = array(
    264264                                        'taxonomy' => 'db-version',
    265                                         'terms'    => [ $term['term_id'] ],
     265                                        'terms'    => [ $term->term_id ],
    266266                                );
    267267                        }
Note: See TracChangeset for help on using the changeset viewer.