Skip to content

Commit

Permalink
Merge pull request #4 from prudloff-insite/patch-1
Browse files Browse the repository at this point in the history
Don't strip XML in <methodCall>
  • Loading branch information
gggeek authored Apr 14, 2024
2 parents a12eea5 + 98f2362 commit 0a1a585
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/XmlRpc.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ final class XmlRpc
public static function xmlrpc_decode($xml, $encoding = "iso-8859-1")
{
$encoder = new Encoder();
if (strpos($xml, '<methodResponse>') === false) {
if (strpos($xml, '<methodResponse>') === false
&& strpos($xml, '<methodCall>') === false
) {
// strip out unnecessary xml in case we're deserializing a single param.
// in case of a complete response, we do not have to strip anything
// please note that the test below has LARGE space for improvement (eg. it might trip on xml comments...)
Expand Down

0 comments on commit 0a1a585

Please sign in to comment.