Changeset 44671
- Timestamp:
- 01/21/2019 07:09:23 PM (6 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-shutdown-handler.php
r44624 r44671 137 137 if ( is_readable( $php_error_pluggable ) ) { 138 138 require_once $php_error_pluggable; 139 die();139 return; 140 140 } 141 141 } … … 167 167 $message = __( 'The site is experiencing technical difficulties.' ); 168 168 169 $args = array( 'response' => 500 ); 169 $args = array( 170 'response' => 500, 171 'exit' => false, 172 ); 170 173 if ( function_exists( 'admin_url' ) ) { 171 174 $args['link_url'] = admin_url(); -
trunk/src/wp-includes/functions.php
r44666 r44671 2958 2958 * @type string $code Error code to use. Default is 'wp_die', or the main error code if $message 2959 2959 * is a WP_Error. 2960 * @type bool $exit Whether to exit the process after completion. Default true. 2960 2961 * } 2961 2962 */ … … 3202 3203 </html> 3203 3204 <?php 3204 die(); 3205 if ( $r['exit'] ) { 3206 die(); 3207 } 3205 3208 } 3206 3209 … … 3237 3240 3238 3241 echo wp_json_encode( $data ); 3239 die(); 3242 if ( $r['exit'] ) { 3243 die(); 3244 } 3240 3245 } 3241 3246 … … 3263 3268 $wp_xmlrpc_server->output( $error->getXml() ); 3264 3269 } 3265 die(); 3270 if ( $r['exit'] ) { 3271 die(); 3272 } 3266 3273 } 3267 3274 … … 3292 3299 3293 3300 if ( is_scalar( $message ) ) { 3294 die( (string) $message ); 3295 } 3296 die( '0' ); 3301 $message = (string) $message; 3302 } else { 3303 $message = '0'; 3304 } 3305 3306 if ( $r['exit'] ) { 3307 die( $message ); 3308 } 3309 3310 echo $message; 3297 3311 } 3298 3312 … … 3303 3317 * 3304 3318 * @since 3.4.0 3319 * @since 5.1.0 Added the $title and $args parameters. 3305 3320 * @access private 3306 3321 * 3307 * @param string $message Optional. Response to print. Default empty. 3308 */ 3309 function _scalar_wp_die_handler( $message = '' ) { 3322 * @param string $message Optional. Response to print. Default empty. 3323 * @param string $title Optional. Error title (unused). Default empty. 3324 * @param string|array $args Optional. Arguments to control behavior. Default empty array. 3325 */ 3326 function _scalar_wp_die_handler( $message = '', $title = '', $args = array() ) { 3327 list( $message, $title, $r ) = _wp_die_process_input( $message, $title, $args ); 3328 3329 if ( $r['exit'] ) { 3330 if ( is_scalar( $message ) ) { 3331 die( (string) $message ); 3332 } 3333 die(); 3334 } 3335 3310 3336 if ( is_scalar( $message ) ) { 3311 die( (string) $message ); 3312 } 3313 die(); 3337 echo (string) $message; 3338 } 3314 3339 } 3315 3340 … … 3329 3354 'response' => 0, 3330 3355 'code' => '', 3356 'exit' => true, 3331 3357 'back_link' => false, 3332 3358 'link_url' => '',
Note: See TracChangeset
for help on using the changeset viewer.