Ticket #13659: wp_mkdir_p_p2.patch
File wp_mkdir_p_p2.patch, 634 bytes (added by , 15 years ago) |
---|
-
wp-includes/functions.php
2031 2031 if ( @mkdir( $target ) ) { 2032 2032 $stat = @stat( dirname( $target ) ); 2033 2033 $dir_perms = $stat['mode'] & 0007777; // Get the permission bits. 2034 @chmod( $target, $dir_perms ); 2034 if( ( $dir_perms & 0007000 ) == 0 || ! ini_get('safe_mode') ) { // Cannot set the SUID, SGID and sticky bits in safe mode 2035 @chmod( $target, $dir_perms ); 2036 } 2035 2037 return true; 2036 2038 } elseif ( is_dir( dirname( $target ) ) ) { 2037 2039 return false;