From: gggeek Date: Sat, 30 May 2015 09:18:29 +0000 (+0200) Subject: Better support for 'undefined' values in debugger's 'load method synopsis' X-Git-Tag: 4.0.0-alpha^2~29 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=a82e460deba4bf91a047943de0ae2613a8acff4f Better support for 'undefined' values in debugger's 'load method synopsis' --- 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) {