nusoap
nusoap copied to clipboard
No memory error
Hello, Recently I have been having problems with parsing some XML files using nusoap, these problems happen because the sent envelopes are too large.
Since this is legacy software, any kind of change has a monster impact.
I noticed that by changing a parameter within the nusoap lib this error stops occurring.
According to my understanding this piece of code just breaks the XML file into several smaller parts so that the parser process can be done.
nusoap.php line : 6793
$chunkSize = 256;
for($pointer = 0; $pointer < strlen($xml) && empty($parseErrors); $pointer += $chunkSize) {
$xmlString = substr($xml, $pointer, $chunkSize);
if(!xml_parse($this->parser, $xmlString, false)) {
$parseErrors['lineNumber'] = xml_get_current_line_number($this->parser);
$parseErrors['errorString'] = xml_error_string(xml_get_error_code($this->parser));
};
}
Hi. Could you please prepare PR?