nusoap icon indicating copy to clipboard operation
nusoap copied to clipboard

No memory error

Open jerfeson opened this issue 3 years ago • 1 comments

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));
   };
  }

jerfeson avatar Dec 16 '21 19:12 jerfeson

Hi. Could you please prepare PR?

f3l1x avatar Jul 26 '22 08:07 f3l1x