Make WordPress Core


Ignore:
Timestamp:
10/13/2015 01:00:04 AM (9 years ago)
Author:
wonderboymusic
Message:

XML-RPC: Add a filter, xmlrpc_memory_limit, to allow the value of $xmlrpc_memory_limit to be increased.

Props ankit.gade.
Fixes #29957.

File:
1 edited

Legend:

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

    r34571 r35095  
    269269        xml_set_element_handler($this->_parser, 'tag_open', 'tag_close');
    270270        xml_set_character_data_handler($this->_parser, 'cdata');
    271         $chunk_size = 262144; // 256Kb, parse in chunks to avoid the RAM usage on very large messages
     271
     272        // 256Kb, parse in chunks to avoid the RAM usage on very large messages
     273        $xmlrpc_memory_limit = 262144;
     274        /**
     275         * Filter the maximum memory that can be used to parse an XML-RPC reponse message.
     276         *
     277         * @since 4.4.0
     278         *
     279         * @param int $xmlrpc_memory_limit Default value of memory allotted.
     280         */
     281        $chunk_size = apply_filters( 'xmlrpc_memory_limit', $xmlrpc_memory_limit );
     282
    272283        $final = false;
    273284        do {
Note: See TracChangeset for help on using the changeset viewer.