Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix for Issue #5109 #5115

Merged
merged 3 commits into from Mar 25, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions php/utils.php
Expand Up @@ -423,6 +423,14 @@ function launch_editor_for_input( $input, $title = 'WP-CLI', $ext = 'tmp' ) {
function mysql_host_to_cli_args( $raw_host ) {
$assoc_args = array();

/**
* If the host string begins with 'p:' for a persistent db connection,
* replace 'p:' with nothing.
*/
if ( substr( $raw_host, 0, 2 ) == 'p:' ) {
$raw_host = substr_replace( $raw_host, '', 0, 2 );
}

$host_parts = explode( ':', $raw_host );
if ( count( $host_parts ) === 2 ) {
list( $assoc_args['host'], $extra ) = $host_parts;
Expand Down