Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions features/core-install.feature
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,22 @@ Feature: Install WordPress core
"""
And the return code should be 0

Scenario: Install WordPress with special characters in the admin password
Given an empty directory
And WP files
And wp-config.php
And a database

When I run `wp core install --url=localhost:8001 --title=Test --admin_user=wpcli [email protected] --admin_password='R^^CzY;G"iZ@]H9b,' --skip-email`
Then STDOUT should contain:
"""
Success: WordPress installed successfully.
"""
And the return code should be 0

When I run `wp user check-password wpcli 'R^^CzY;G"iZ@]H9b,'`
Then the return code should be 0

@less-than-php-7
Scenario: Install WordPress with locale set to de_DE on WP < 4.0
Given an empty directory
Expand Down
2 changes: 1 addition & 1 deletion src/Core_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@
}

$public = true;
$password = $args['admin_password'];
$password = wp_slash( $args['admin_password'] );

if ( ! is_email( $args['admin_email'] ) ) {
WP_CLI::error( "The '{$args['admin_email']}' email address is invalid." );
Expand All @@ -712,7 +712,7 @@
$args['admin_email'],
$public,
'',
$password,

Check failure on line 715 in src/Core_Command.php

View workflow job for this annotation

GitHub Actions / code-quality / PHPStan

Parameter #6 $user_password of function wp_install expects string, array|string given.
$args['locale']
);

Expand Down
Loading