WordPress.org

Make WordPress Core

Changeset 45711


Ignore:
Timestamp:
08/01/2019 03:03:33 PM (10 months ago)
Author:
SergeyBiryukov
Message:

Taxonomy: Correct some strict comparisons after [45710].

See #47573.

File:
1 edited

Legend:

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

    r45710 r45711  
    17711771
    17721772    if ( 'category' === $taxonomy ) {
    1773         $defaults['default'] = get_option( 'default_category' );
     1773        $defaults['default'] = (int) get_option( 'default_category' );
    17741774        if ( $defaults['default'] === $term ) {
    17751775            return 0; // Don't delete the default category
     
    35423542        }
    35433543
    3544         if ( $term->parent === $term_id ) {
     3544        if ( (int) $term->parent === $term_id ) {
    35453545            if ( $use_id ) {
    35463546                $term_list[] = $term->term_id;
Note: See TracChangeset for help on using the changeset viewer.