Ticket #37122: 37122.4.diff
File 37122.4.diff, 3.6 KB (added by , 3 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 wp_die( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) ); 78 } 79 75 80 $xml_parser = xml_parser_create(); 76 81 77 82 // Set the functions to handle opening and closing tags -
src/wp-includes/IXR/class-IXR-message.php
44 44 45 45 function parse() 46 46 { 47 if ( ! function_exists( 'xml_parser_create' ) ) { 48 trigger_error( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML" ) ); 49 return false; 50 } 51 47 52 // first remove the XML declaration 48 53 // merged from WP #10698 - this method avoids the RAM usage of preg_replace on very large messages 49 54 $header = preg_replace( '/<\?xml.*?\?'.'>/s', '', substr( $this->message, 0, 100 ), 1 ); -
src/wp-includes/atomlib.php
121 121 122 122 array_unshift($this->ns_contexts, array()); 123 123 124 if ( ! function_exists( 'xml_parser_create_ns' ) ) { 125 trigger_error( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) ); 126 return false; 127 } 128 124 129 $parser = xml_parser_create_ns(); 125 130 xml_set_object($parser, $this); 126 131 xml_set_element_handler($parser, "start_element", "end_element"); -
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 return array( 'html', "<![CDATA[$data]]>" ); 545 } 546 541 547 $parser = xml_parser_create(); 542 548 xml_parse($parser, '<div>' . $data . '</div>', true); 543 549 $code = xml_get_error_code($parser); -
src/wp-includes/rss.php
60 60 */ 61 61 function __construct( $source ) { 62 62 63 # if PHP xml isn't compiled in, die63 # Check if PHP xml isn't compiled 64 64 # 65 if ( !function_exists('xml_parser_create') ) 66 trigger_error( "Failed to load PHP's XML Extension. https://secure.php.net/manual/en/ref.xml.php" ); 65 if ( ! function_exists('xml_parser_create') ) { 66 return trigger_error( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ); 67 } 67 68 68 $parser = @xml_parser_create();69 $parser = xml_parser_create(); 69 70 70 if ( !is_resource($parser) )71 trigger_error( "Failed to create an instance of PHP's XML parser. https://secure.php.net/manual/en/ref.xml.php");72 73 71 $this->parser = $parser; 74 72 75 73 # pass in parser, and a reference to this object