NuSOAP support for PHP 5.4

If you’ve been using or maintaining support for NuSOAP lately, you’ve certainly realized that it does not work properly anymore.

This is because NuSOAP isn’t maintained anymore, so a lot of things are bound to stop working as PHP versions drop support (or tolerance) for specific code.

Well apparently, there are fixes around. Notably, for PHP 5.4, there’s an error about converting an array to a string, in a debug message, that breaks it considerably when using arrays. You can fix that by commenting line 6133 of nusoap.php (the //$this->debug… line below)

 $rows = sizeof($value);
 $contents = '';
 foreach($value as $k => $v) {
     //$this->debug("serializing array element: $k, $v of type: $typeDef[arrayType]");
     //if (strpos($typeDef['arrayType'], ':') ) {
     if (!in_array($typeDef['arrayType'],$this->typemap[''])) {
         $contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use);
     } else {
         $contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion, false, $use);




Quick Contact Form