Skip to content
Browse files

Fix broken echoNestedStruct function

Fix get_class_methods compatibility


git-svn-id: http://svn.php.net/repository/pear/packages/SOAP_Interop/trunk@161046 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 8188af3 commit 20193fbf98deba86b239ef0bc2a248b433bd522a Klaus Guenther committed Jun 10, 2004
Showing with 6 additions and 1 deletion.
  1. +6 −1 interop_Round2GroupB.php
View
7 interop_Round2GroupB.php
@@ -75,8 +75,13 @@ function &echoSimpleTypesAsStruct(&$string, &$int, &$float)
function &echoNestedStruct(&$struct)
{
- if (array_key_exists('__to_soap', strtolower(get_class_methods($struct))))
+ $separator = "\n";
+ $methods = get_class_methods($struct);
+ $arr_str = $separator . strtolower(implode($separator, $methods));
+ $string = $separator . '__to_soap' . $separator;
+ if(strpos($arr_str, $string) !== false) {
return $struct->__to_soap();
+ }
return $struct;
}

0 comments on commit 20193fb

Please sign in to comment.
Something went wrong with that request. Please try again.