# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: contributions/modules/soapclient/modules/soapclient/soapclient.module
--- contributions/modules/soapclient/modules/soapclient/soapclient.module Base (1.1)
+++ contributions/modules/soapclient/modules/soapclient/soapclient.module Locally Modified (Based On 1.1)
@@ -508,6 +508,21 @@
 }
 
 /**
+ * Check if a variable is empty (including white space strings), or
+ * it contains the value "0".
+ *
+ * @param  $var
+ *   A string to check if for empty.
+ * 
+ * @return 
+ *   Returns BOOLEN FALSE if $var is empty or contains only a white space string
+ */
+function soapclient_empty_string($var){
+  $result = trim($var);
+  return (!is_numeric($result)) ? empty($result) : FALSE;
+}
+
+/**
 * Initialising the client.
 * 
 * @param $endpoint
@@ -577,10 +592,14 @@
 
   $options = (array) $options;
   
-  $proxyhost = variable_get('soapclient_proxyhost', NULL);
-  $proxyport = variable_get('soapclient_proxyport', NULL);
-  $proxyuser = variable_get('soapclient_proxyuser', NULL);
-  $proxypass = variable_get('soapclient_proxypass', NULL);
\ No newline at end of file
+  $proxyhost = variable_get('soapclient_proxyhost', '');
+  if (soapclient_empty_string($proxyhost)) $proxyhost = NULL;
+  $proxyport = variable_get('soapclient_proxyport', '');
+  if (soapclient_empty_string($proxyport)) $proxyport = NULL;
+  $proxyuser = variable_get('soapclient_proxyuser', '');
+  if (soapclient_empty_string($proxyuser)) $proxyuser = NULL;
+  $proxypass = variable_get('soapclient_proxypass', '');
+  if (soapclient_empty_string($proxypass)) $proxypass = NULL;
 
   if ( $soapclient_LIBRARY == 'nuSOAP' )
   {    
