diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php index 3725292dcc..6e9de6c3f4 100644 --- a/wp-includes/plugin.php +++ b/wp-includes/plugin.php @@ -470,6 +470,9 @@ function do_action( $tag, ...$arg ) { if ( empty( $arg ) ) { $arg[] = ''; + } elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) { + // Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`. + $arg[0] = $arg[0][0]; } $wp_filter[ $tag ]->do_action( $arg ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 185c122831..25d503061c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-RC1-46567'; +$wp_version = '5.3-RC1-46568'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.