From d950c7530735035eb557f91fdde747a8a8e3dda8 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Fri, 2 Mar 2018 17:17:31 +0000 Subject: [PATCH] Import: Avoid counting an uncountable type when reading arguments passed to a script. Props josephscott. Fixes #42898. Built from https://develop.svn.wordpress.org/trunk@42771 git-svn-id: http://core.svn.wordpress.org/trunk@42601 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-importer.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-importer.php b/wp-admin/includes/class-wp-importer.php index e9dc496536..d59311e11d 100644 --- a/wp-admin/includes/class-wp-importer.php +++ b/wp-admin/includes/class-wp-importer.php @@ -281,6 +281,9 @@ class WP_Importer { */ function get_cli_args( $param, $required = false ) { $args = $_SERVER['argv']; + if ( ! is_array( $args ) ) { + $args = array(); + } $out = array(); diff --git a/wp-includes/version.php b/wp-includes/version.php index 2c90a89fc4..6f0ddb42cf 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42770'; +$wp_version = '5.0-alpha-42771'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.