From d73188d62049634a0cb0d280de18ee04904e7342 Mon Sep 17 00:00:00 2001
From: ggiunta <ggiunta@013ecfd8-0664-425d-a759-9c98391dc3f9>
Date: Sun, 23 May 2010 13:45:09 +0000
Subject: [PATCH] - fix bug 3002710: ex:nil not bound because ex namespace not
 included

git-svn-id: https://svn.code.sf.net/p/phpxmlrpc/code/trunk/xmlrpc@74 013ecfd8-0664-425d-a759-9c98391dc3f9
---
 lib/xmlrpc.inc | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/xmlrpc.inc b/lib/xmlrpc.inc
index ad414140..36ea008d 100644
--- a/lib/xmlrpc.inc
+++ b/lib/xmlrpc.inc
@@ -226,6 +226,7 @@
 
 	// set to TRUE to enable encoding of php NULL values to <EX:NIL/> instead of <NIL/>
 	$GLOBALS['xmlrpc_null_apache_encoding']=false;
+    $GLOBALS['xmlrpc_null_apache_encoding_ns']='http://ws.apache.org/xmlrpc/namespaces/extensions';
 
 	// used to store state during parsing
 	// quick explanation of components:
@@ -2053,7 +2054,14 @@
 				$this->content_type = 'text/xml; charset=' . $charset_encoding;
 			else
 				$this->content_type = 'text/xml';
-			$result = "<methodResponse>\n";
+		    if ($GLOBALS['xmlrpc_null_apache_encoding'])
+		    {
+		        $result = "<methodResponse xmlns:ex=\"".$GLOBALS['xmlrpc_null_apache_encoding_ns']."\">\n";
+		    }
+		    else
+		    {
+		        $result = "<methodResponse>\n";
+		    }
 			if($this->errno)
 			{
 				// G. Giunta 2005/2/13: let non-ASCII response messages be tolerated by clients
-- 
2.47.0