Ticket #29957: class-IXR.2.diff
File class-IXR.2.diff, 990 bytes (added by , 9 years ago) |
---|
-
wp-includes/class-IXR.php
241 241 xml_set_object($this->_parser, $this); 242 242 xml_set_element_handler($this->_parser, 'tag_open', 'tag_close'); 243 243 xml_set_character_data_handler($this->_parser, 'cdata'); 244 $chunk_size = 262144; // 256Kb, parse in chunks to avoid the RAM usage on very large messages 244 245 /** 246 * Allows to set maximum memory that can be used to parse xml-rpc reponse message. 247 * 248 * @param int 262144 Default value of memory allotted. 249 */ 250 $chunk_size = 262144; // 256Kb, parse in chunks to avoid the RAM usage on very large messages 251 if ( function_exists( 'apply_filters' ) ) { 252 $chunk_size = apply_filters( 'xmlrpc_memory_limit', $chunk_size ); 253 } 245 254 $final = false; 246 255 do { 247 256 if (strlen($this->message) <= $chunk_size) {