diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index 6fd145d6b8..3917275b5d 100644
a
|
b
|
function _default_wp_die_handler( $message, $title = '', $args = array() ) { |
3796 | 3796 | </head> |
3797 | 3797 | <body id="error-page"> |
3798 | 3798 | <?php endif; // ! did_action( 'admin_head' ) ?> |
| 3799 | |
3799 | 3800 | <?php |
3800 | 3801 | if( is_array( $message ) ) { |
| 3802 | echo '<pre>'; |
3801 | 3803 | print_r( $message ); |
| 3804 | echo '</pre>'; |
3802 | 3805 | } else { |
3803 | 3806 | echo $message; |
3804 | 3807 | } |
3805 | 3808 | ?> |
| 3809 | |
3806 | 3810 | </body> |
3807 | 3811 | </html> |
3808 | 3812 | <?php |
… |
… |
function _ajax_wp_die_handler( $message, $title = '', $args = array() ) { |
3850 | 3854 | die( $message ); |
3851 | 3855 | } |
3852 | 3856 | |
3853 | | echo $message; |
| 3857 | if( is_array( $message ) ) { |
| 3858 | print_r( $message ); |
| 3859 | } else { |
| 3860 | echo $message; |
| 3861 | } |
3854 | 3862 | } |
3855 | 3863 | |
3856 | 3864 | /** |
… |
… |
function _xmlrpc_wp_die_handler( $message, $title = '', $args = array() ) { |
3956 | 3964 | nocache_headers(); |
3957 | 3965 | } |
3958 | 3966 | |
| 3967 | if( is_array( $message ) ) { |
| 3968 | $message = wp_json_encode( $message ); |
| 3969 | } |
| 3970 | |
3959 | 3971 | if ( $wp_xmlrpc_server ) { |
3960 | 3972 | $error = new IXR_Error( $parsed_args['response'], $message ); |
3961 | 3973 | $wp_xmlrpc_server->output( $error->getXml() ); |
… |
… |
function _xmlrpc_wp_die_handler( $message, $title = '', $args = array() ) { |
3980 | 3992 | function _xml_wp_die_handler( $message, $title = '', $args = array() ) { |
3981 | 3993 | list( $message, $title, $parsed_args ) = _wp_die_process_input( $message, $title, $args ); |
3982 | 3994 | |
| 3995 | if( is_array( $message ) ) { |
| 3996 | $message = wp_json_encode( $message ); |
| 3997 | } |
| 3998 | |
3983 | 3999 | $message = htmlspecialchars( $message ); |
3984 | 4000 | $title = htmlspecialchars( $title ); |
3985 | 4001 | |