mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Coding Standards: Use strict comparison for more count() calls.
Follow-up to [47848]. Props mukesh27. Fixes #50232. See #49542. git-svn-id: https://develop.svn.wordpress.org/trunk@47851 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -824,7 +824,7 @@ class WP_Date_Query {
|
||||
|
||||
case 'BETWEEN':
|
||||
case 'NOT BETWEEN':
|
||||
if ( ! is_array( $value ) || 2 != count( $value ) ) {
|
||||
if ( ! is_array( $value ) || 2 !== count( $value ) ) {
|
||||
$value = array( $value, $value );
|
||||
} else {
|
||||
$value = array_values( $value );
|
||||
|
||||
@@ -4237,7 +4237,8 @@ function wp_update_post( $postarr = array(), $wp_error = false ) {
|
||||
|
||||
// Passed post category list overwrites existing category list if not empty.
|
||||
if ( isset( $postarr['post_category'] ) && is_array( $postarr['post_category'] )
|
||||
&& 0 != count( $postarr['post_category'] ) ) {
|
||||
&& count( $postarr['post_category'] ) > 0
|
||||
) {
|
||||
$post_cats = $postarr['post_category'];
|
||||
} else {
|
||||
$post_cats = $post['post_category'];
|
||||
|
||||
Reference in New Issue
Block a user