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
This commit is contained in:
parent
dc9517a3e0
commit
d2a504e6cb
|
@ -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 ] ) );
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue