Changeset 45111 for trunk/src/wp-includes/functions.php
- Timestamp:
- 04/04/2019 09:53:45 PM (7 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/functions.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r45104 r45111 7015 7015 * 7016 7016 * @since MU (3.0.0) 7017 * @since 5.2.0 $max_execution_time parameter added. 7017 7018 * 7018 7019 * @param string $directory Full path of a directory. … … 7052 7053 * @since MU (3.0.0) 7053 7054 * @since 4.3.0 $exclude parameter added. 7055 * @since 5.2.0 $max_execution_time parameter added. 7054 7056 * 7055 7057 * @param string $directory Full path of a directory. … … 7068 7070 } 7069 7071 7070 if ( ! $max_execution_time) {7071 // Keep the previous behavior but attempt to prevent fatal errors from timeout .7072 if ( $max_execution_time === null ) { 7073 // Keep the previous behavior but attempt to prevent fatal errors from timeout if possible. 7072 7074 if ( function_exists( 'ini_get' ) ) { 7073 7075 $max_execution_time = ini_get( 'max_execution_time' ); 7074 7076 } else { 7075 // Use PHP default.7076 $max_execution_time = 30;7077 // Disable... 7078 $max_execution_time = 0; 7077 7079 } 7078 7080 … … 7096 7098 } 7097 7099 7098 if ( microtime( true ) - WP_START_TIMESTAMP > $max_execution_time ) {7100 if ( $max_execution_time > 0 && microtime( true ) - WP_START_TIMESTAMP > $max_execution_time ) { 7099 7101 // Time exceeded. Give up instead of risking a fatal timeout. 7100 7102 $size = null;
Note: See TracChangeset
for help on using the changeset viewer.