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
This commit is contained in:
Dominik Schilling 2018-03-02 17:17:31 +00:00
parent de8936588c
commit d950c75307
2 changed files with 4 additions and 1 deletions

View File

@ -281,6 +281,9 @@ class WP_Importer {
*/ */
function get_cli_args( $param, $required = false ) { function get_cli_args( $param, $required = false ) {
$args = $_SERVER['argv']; $args = $_SERVER['argv'];
if ( ! is_array( $args ) ) {
$args = array();
}
$out = array(); $out = array();

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.