SSH2 Upgrade transport: Trim the trailing newline character from the ouput of pwd to avoid a PHP Segfault.

Fixes #30802 for trunk.

Built from https://develop.svn.wordpress.org/trunk@31686


git-svn-id: http://core.svn.wordpress.org/trunk@31667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2015-03-09 04:32:27 +00:00
parent a685aa6670
commit 8a9181d8d4
2 changed files with 4 additions and 3 deletions

View File

@ -184,8 +184,9 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
public function cwd() {
$cwd = $this->run_command('pwd');
if ( $cwd )
$cwd = trailingslashit($cwd);
if ( $cwd ) {
$cwd = trailingslashit( trim( $cwd ) );
}
return $cwd;
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-alpha-31685';
$wp_version = '4.2-alpha-31686';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.