From d2a504e6cb62bc8902f956fd6a7a3514d5def02c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 4 Sep 2023 11:40:22 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `wp-includes/class-wp-hook.php`. Follow-up to [4955], [38571]. Props aristath, poena, afercia, SergeyBiryukov. See #58831. Built from https://develop.svn.wordpress.org/trunk@56511 git-svn-id: http://core.svn.wordpress.org/trunk@56023 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-hook.php | 6 +++--- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/class-wp-hook.php b/wp-includes/class-wp-hook.php index 0f7dc4b7a3..795aec4fe1 100644 --- a/wp-includes/class-wp-hook.php +++ b/wp-includes/class-wp-hook.php @@ -78,7 +78,7 @@ final class WP_Hook implements Iterator, ArrayAccess { $this->callbacks[ $priority ][ $idx ] = array( 'function' => $callback, - 'accepted_args' => $accepted_args, + 'accepted_args' => (int) $accepted_args, ); // If we're adding a new priority to the list, put them back in sorted order. @@ -304,12 +304,12 @@ final class WP_Hook implements Iterator, ArrayAccess { } // Avoid the array_slice() if possible. - if ( 0 == $the_['accepted_args'] ) { + if ( 0 === $the_['accepted_args'] ) { $value = call_user_func( $the_['function'] ); } elseif ( $the_['accepted_args'] >= $num_args ) { $value = call_user_func_array( $the_['function'], $args ); } else { - $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) ); + $value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) ); } } } while ( false !== next( $this->iterations[ $nesting_level ] ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 12e9bf333d..7c58d52fad 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56510'; +$wp_version = '6.4-alpha-56511'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.