Make WordPress Core

Changeset 60282


Ignore:
Timestamp:
06/05/2025 10:59:30 AM (6 weeks ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Remove redundant ! empty() check in is_object_in_term().

If $object_terms is empty, the immediately preceding code block causes the function to return early.

Follow-up to [8131], [10159].

Props justlevine.
See #63268.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r60264 r60282  
    48994899        return $object_terms;
    49004900    }
     4901
    49014902    if ( empty( $object_terms ) ) {
    49024903        return false;
    49034904    }
     4905
    49044906    if ( empty( $terms ) ) {
    4905         return ( ! empty( $object_terms ) );
     4907        return true;
    49064908    }
    49074909
Note: See TracChangeset for help on using the changeset viewer.