Make WordPress Core


Ignore:
Timestamp:
05/23/2020 04:20:10 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison for more count() calls.

Follow-up to [47848].

Props mukesh27.
Fixes #50232. See #49542.

File:
1 edited

Legend:

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

    r47848 r47851  
    42384238    // Passed post category list overwrites existing category list if not empty.
    42394239    if ( isset( $postarr['post_category'] ) && is_array( $postarr['post_category'] )
    4240             && 0 != count( $postarr['post_category'] ) ) {
     4240        && count( $postarr['post_category'] ) > 0
     4241    ) {
    42414242        $post_cats = $postarr['post_category'];
    42424243    } else {
Note: See TracChangeset for help on using the changeset viewer.