- fix bug 3002710: ex:nil not bound because ex namespace not included
authorggiunta <ggiunta@013ecfd8-0664-425d-a759-9c98391dc3f9>
Sun, 23 May 2010 13:45:09 +0000 (13:45 +0000)
committerggiunta <ggiunta@013ecfd8-0664-425d-a759-9c98391dc3f9>
Sun, 23 May 2010 13:45:09 +0000 (13:45 +0000)
git-svn-id: https://svn.code.sf.net/p/phpxmlrpc/code/trunk/xmlrpc@74 013ecfd8-0664-425d-a759-9c98391dc3f9

lib/xmlrpc.inc

index ad41414..36ea008 100644 (file)
 \r
        // set to TRUE to enable encoding of php NULL values to <EX:NIL/> instead of <NIL/>\r
        $GLOBALS['xmlrpc_null_apache_encoding']=false;\r
+    $GLOBALS['xmlrpc_null_apache_encoding_ns']='http://ws.apache.org/xmlrpc/namespaces/extensions';\r
 \r
        // used to store state during parsing\r
        // quick explanation of components:\r
                                $this->content_type = 'text/xml; charset=' . $charset_encoding;\r
                        else\r
                                $this->content_type = 'text/xml';\r
-                       $result = "<methodResponse>\n";\r
+                   if ($GLOBALS['xmlrpc_null_apache_encoding'])\r
+                   {\r
+                       $result = "<methodResponse xmlns:ex=\"".$GLOBALS['xmlrpc_null_apache_encoding_ns']."\">\n";\r
+                   }\r
+                   else\r
+                   {\r
+                       $result = "<methodResponse>\n";\r
+                   }\r
                        if($this->errno)\r
                        {\r
                                // G. Giunta 2005/2/13: let non-ASCII response messages be tolerated by clients\r