Ticket #36455: 36455.7.diff
| File 36455.7.diff, 1.9 KB (added by , 6 years ago) |
|---|
-
wp-admin/includes/file.php
1727 1727 $from = trailingslashit( $from ); 1728 1728 $to = trailingslashit( $to ); 1729 1729 1730 $opcacheEnabled = function_exists( 'opcache_invalidate' ); 1731 1730 1732 foreach ( (array) $dirlist as $filename => $fileinfo ) { 1731 1733 if ( in_array( $filename, $skip_list, true ) ) { 1732 1734 continue; … … 1740 1742 return new WP_Error( 'copy_failed_copy_dir', __( 'Could not copy file.' ), $to . $filename ); 1741 1743 } 1742 1744 } 1745 if ($opcacheEnabled && in_array( pathinfo( $filename, PATHINFO_EXTENSION ), array( 'php', 'phtml' ) ) ) { 1746 opcache_invalidate( $to . $filename ); 1747 } 1743 1748 } elseif ( 'd' == $fileinfo['type'] ) { 1744 1749 if ( ! $wp_filesystem->is_dir( $to . $filename ) ) { 1745 1750 if ( ! $wp_filesystem->mkdir( $to . $filename, FS_CHMOD_DIR ) ) { -
wp-admin/includes/update-core.php
1338 1338 $from = trailingslashit( $from ); 1339 1339 $to = trailingslashit( $to ); 1340 1340 1341 $opcacheEnabled = function_exists( 'opcache_invalidate' ); 1342 1341 1343 foreach ( (array) $dirlist as $filename => $fileinfo ) { 1342 1344 if ( in_array( $filename, $skip_list, true ) ) { 1343 1345 continue; … … 1351 1353 return new WP_Error( 'copy_failed__copy_dir', __( 'Could not copy file.' ), $to . $filename ); 1352 1354 } 1353 1355 } 1356 if ($opcacheEnabled && in_array( pathinfo( $filename, PATHINFO_EXTENSION ), array( 'php', 'phtml' ) ) ) { 1357 opcache_invalidate( $to . $filename ); 1358 } 1354 1359 } elseif ( 'd' == $fileinfo['type'] ) { 1355 1360 if ( ! $wp_filesystem->is_dir( $to . $filename ) ) { 1356 1361 if ( ! $wp_filesystem->mkdir( $to . $filename, FS_CHMOD_DIR ) ) {