Ticket #6834: file-php-more-verbose-error.patch
| File file-php-more-verbose-error.patch, 0.9 kB (added by plankers, 7 months ago) |
|---|
-
wp-admin/includes/file.php
old new 259 259 $tmppath .= $path[$j] . '/'; 260 260 if ( ! $fs->is_dir($to . $tmppath) ) 261 261 if ( !$fs->mkdir($to . $tmppath, 0755) ) 262 return new WP_Error('mkdir_failed', __( 'Could not create directory'));262 return new WP_Error('mkdir_failed', __("Could not create directory: $to$tmppath")); 263 263 } 264 264 265 265 // We've made sure the folders are there, so let's extract the file now: 266 266 if ( ! $file['folder'] ) 267 267 if ( !$fs->put_contents( $to . $file['filename'], $file['content']) ) 268 return new WP_Error('copy_failed', __( 'Could not copy file'));268 return new WP_Error('copy_failed', __("Could not copy file to $to")); 269 269 $fs->chmod($to . $file['filename'], 0644); 270 270 } 271 271
