From a82e460deba4bf91a047943de0ae2613a8acff4f Mon Sep 17 00:00:00 2001 From: gggeek Date: Sat, 30 May 2015 11:18:29 +0200 Subject: [PATCH] Better support for 'undefined' values in debugger's 'load method synopsis' --- debugger/action.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/debugger/action.php b/debugger/action.php index 18d9295..0e6ee45 100644 --- a/debugger/action.php +++ b/debugger/action.php @@ -373,13 +373,20 @@ if ($action) { echo htmlspecialchars($y->scalarval(), ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding); if ($wstype != 1) { $type = $y->scalarval(); - if ($type == 'null') { - $type = 'nil'; + $payload .= ''; + switch($type) { + case 'undefined': + break; + case 'null'; + $type = 'nil'; + // fall thru intentionally + default: + $payload .= '<' . + htmlspecialchars($type, ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding) . + '>'; } - $payload = $payload . '<' . - htmlspecialchars($type, ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding) . - '>\n"; + $payload .= "\n"; } $alt_payload .= $y->scalarval(); if ($k < $x->arraysize() - 1) { -- 2.43.0