Code Duplication    Length = 7-9 lines in 2 locations

admin/gateways/pec24/nusoap.php 2 locations

@@ 1340-1346 (lines=7) @@
1337
            }
1338
1339
            // Parse the XML file.
1340
            if (!xml_parse($this->parser, $xml, true)) {
1341
                // Display an error message.
1342
                $errstr = sprintf('XML error parsing XML schema on line %d: %s', xml_get_current_line_number($this->parser), xml_error_string(xml_get_error_code($this->parser)));
1343
                $this->debug($errstr);
1344
                $this->debug("XML payload:\n" . $xml);
1345
                $this->setError($errstr);
1346
            }
1347
1348
            xml_parser_free($this->parser);
1349
        } else {
@@ 5197-5205 (lines=9) @@
5194
        xml_set_element_handler($this->parser, 'start_element', 'end_element');
5195
        xml_set_character_data_handler($this->parser, 'character_data');
5196
        // Parse the XML file.
5197
        if (!xml_parse($this->parser, $wsdl_string, true)) {
5198
            // Display an error message.
5199
            $errstr = sprintf('XML error parsing WSDL from %s on line %d: %s', $wsdl, xml_get_current_line_number($this->parser), xml_error_string(xml_get_error_code($this->parser)));
5200
            $this->debug($errstr);
5201
            $this->debug("XML payload:\n" . $wsdl_string);
5202
            $this->setError($errstr);
5203
5204
            return false;
5205
        }
5206
        // free the parser
5207
        xml_parser_free($this->parser);
5208
        $this->debug('Parsing WSDL done');