Make WordPress Core

Changeset 31686


Ignore:
Timestamp:
03/09/2015 04:31:21 AM (12 years ago)
Author:
dd32
Message:

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

Fixes #30802 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-filesystem-ssh2.php

    r31219 r31686  
    185185        public function cwd() {
    186186                $cwd = $this->run_command('pwd');
    187                 if ( $cwd )
    188                         $cwd = trailingslashit($cwd);
     187                if ( $cwd ) {
     188                        $cwd = trailingslashit( trim( $cwd ) );
     189                }
    189190                return $cwd;
    190191        }
Note: See TracChangeset for help on using the changeset viewer.