Code Duplication    Length = 8-8 lines in 2 locations

Components/Klarna/transport/xmlrpc-3.0.0.beta/lib/xmlrpc.inc 1 location

@@ 2570-2577 (lines=8) @@
2567
2568
			// if response charset encoding is not known / supported, try to use
2569
			// the default encoding and parse the xml anyway, but log a warning...
2570
			if (!in_array($resp_encoding, array('UTF-8', 'ISO-8859-1', 'US-ASCII')))
2571
			// the following code might be better for mb_string enabled installs, but
2572
			// makes the lib about 200% slower...
2573
			//if (!is_valid_charset($resp_encoding, array('UTF-8', 'ISO-8859-1', 'US-ASCII')))
2574
			{
2575
				error_log('XML-RPC: '.__METHOD__.': invalid charset encoding of received response: '.$resp_encoding);
2576
				$resp_encoding = $GLOBALS['xmlrpc_defencoding'];
2577
			}
2578
			$parser = xml_parser_create($resp_encoding);
2579
			xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, true);
2580
			// G. Giunta 2005/02/13: PHP internally uses ISO-8859-1, so we have to tell

Components/Klarna/transport/xmlrpc-3.0.0.beta/lib/xmlrpcs.inc 1 location

@@ 941-948 (lines=8) @@
938
			// decompose incoming XML into request structure
939
			if ($req_encoding != '')
940
			{
941
				if (!in_array($req_encoding, array('UTF-8', 'ISO-8859-1', 'US-ASCII')))
942
				// the following code might be better for mb_string enabled installs, but
943
				// makes the lib about 200% slower...
944
				//if (!is_valid_charset($req_encoding, array('UTF-8', 'ISO-8859-1', 'US-ASCII')))
945
				{
946
					error_log('XML-RPC: '.__METHOD__.': invalid charset encoding of received request: '.$req_encoding);
947
					$req_encoding = $GLOBALS['xmlrpc_defencoding'];
948
				}
949
				/// @BUG this will fail on PHP 5 if charset is not specified in the xml prologue,
950
				// the encoding is not UTF8 and there are non-ascii chars in the text...
951
				/// @todo use an ampty string for php 5 ???