mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-17 03:56:07 +00:00
Fix unlink warning. see #9936
git-svn-id: http://svn.automattic.com/wordpress/trunk@11465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fc523a990a
commit
a4a448741e
@ -631,10 +631,12 @@ function get_filesystem_method($args = array()) {
|
|||||||
if( ! $method && function_exists('getmyuid') && function_exists('fileowner') ){
|
if( ! $method && function_exists('getmyuid') && function_exists('fileowner') ){
|
||||||
$temp_file_name = ABSPATH . '.' . time();
|
$temp_file_name = ABSPATH . '.' . time();
|
||||||
$temp_handle = @fopen($temp_file_name, 'w');
|
$temp_handle = @fopen($temp_file_name, 'w');
|
||||||
if ( $temp_handle && getmyuid() == fileowner($temp_file_name) )
|
if ( $temp_handle ) {
|
||||||
$method = 'direct';
|
if ( getmyuid() == fileowner($temp_file_name) )
|
||||||
@fclose($temp_handle);
|
$method = 'direct';
|
||||||
unlink($temp_file_name);
|
@fclose($temp_handle);
|
||||||
|
unlink($temp_file_name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh2') && extension_loaded('sockets') ) $method = 'ssh2';
|
if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh2') && extension_loaded('sockets') ) $method = 'ssh2';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user