Explorar o código

Fix Zend_XmlRpc_Value nil parsing for PHP 5.4 and 5.5

Martin Hujer %!s(int64=12) %!d(string=hai) anos
pai
achega
ddf50cfe61
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      library/Zend/XmlRpc/Value.php

+ 5 - 0
library/Zend/XmlRpc/Value.php

@@ -500,6 +500,11 @@ abstract class Zend_XmlRpc_Value
             }
         }
 
+        //if there is a child element, try to parse type for it
+        if (!$type && $value instanceof SimpleXMLElement) {
+            self::_extractTypeAndValue($value->children(), $type, $value);
+        }
+
         // If no type was specified, the default is string
         if (!$type) {
             $type = self::XMLRPC_TYPE_STRING;