Make WordPress Core


Ignore:
Timestamp:
10/24/2016 04:44:07 AM (8 years ago)
Author:
pento
Message:

General: Check to see that the PHP-XML module is enabled before using XML functions.

There are a handful of places where we don't check that the XML functions exist before we use them. Ubuntu's PHP 7 packages don't include PHP-XML by default, increasing the chance of this causing issues.

Props kraftbj, markoheijnen.
Fixes #37122.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/IXR/class-IXR-message.php

    r38389 r38883  
    4545    function parse()
    4646    {
     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
    4752        // first remove the XML declaration
    4853        // merged from WP #10698 - this method avoids the RAM usage of preg_replace on very large messages
Note: See TracChangeset for help on using the changeset viewer.