Ticket #37122: 37122.diff
| File 37122.diff, 2.6 KB (added by , 10 years ago) |
|---|
-
src/wp-admin/link-parse-opml.php
72 72 } 73 73 74 74 // Create an XML parser 75 if ( ! function_exists( 'xml_parser_create' ) ) { 76 trigger_error( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) ); 77 } 75 78 $xml_parser = xml_parser_create(); 76 79 77 80 // Set the functions to handle opening and closing tags -
src/wp-includes/atomlib.php
121 121 122 122 array_unshift($this->ns_contexts, array()); 123 123 124 if ( ! function_exists( 'xml_parser_create' ) ) { 125 trigger_error( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) ); 126 } 127 124 128 $parser = xml_parser_create_ns(); 125 129 xml_set_object($parser, $this); 126 130 xml_set_element_handler($parser, "start_element", "end_element"); -
src/wp-includes/class-IXR.php
219 219 self::__construct( $message ); 220 220 } 221 221 222 function parse() 223 { 222 function parse() { 223 if ( ! function_exists( 'xml_parser_create' ) ) { 224 trigger_error( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML" ) ); 225 } 226 224 227 // first remove the XML declaration 225 228 // merged from WP #10698 - this method avoids the RAM usage of preg_replace on very large messages 226 229 $header = preg_replace( '/<\?xml.*?\?'.'>/s', '', substr( $this->message, 0, 100 ), 1 ); … … 1220 1223 return parent::query('system.multicall', $this->calls); 1221 1224 } 1222 1225 } 1226 -
src/wp-includes/feed.php
538 538 return array('text', $data); 539 539 } 540 540 541 if ( ! function_exists( 'xml_parser_create' ) ) { 542 trigger_error( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) ); 543 } 544 541 545 $parser = xml_parser_create(); 542 546 xml_parse($parser, '<div>' . $data . '</div>', true); 543 547 $code = xml_get_error_code($parser);