php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73782 returning nested standard class functions more then 2 layers deep fails
Submitted: 2016-12-19 05:47 UTC Modified: -
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: squarerootofnegativeone at gmail dot com Assigned:
Status: Open Package: SOAP related
PHP Version: 7.1.0 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
32 + 10 = ?
Subscribe to this entry?

 
 [2016-12-19 05:47 UTC] squarerootofnegativeone at gmail dot com
Description:
------------
When a soap server returns nested standard class functions more then 2 layers deep the resulting xml is invalid causing an error on the client side with no error report on the server side.

Test script:
---------------
<?php

//connect to soap server
$options= array(
  'location' 	=>	'https://way.bz/~soap_test',
  'uri'			=>	'https://way.bz/~soap_test',
  'soap_version' => SOAP_1_2
);
$client=new SoapClient(NULL,$options);
		
		
print_r($client->good());		//returns json_decode('{"tc": {"info": "h","st": 7}}');
print_r($client->noGood());		//returns json_decode('{"tc": {"info": {"10": {"l": 0}},"st": {"13": 13}}}');

Expected result:
----------------
Don't expect a fatal error.

Actual result:
--------------
stdClass Object ( [tc] => stdClass Object ( [info] => h [st] => 7 ) ) 
Fatal error: Uncaught SoapFault exception: [Sender] looks like we got no XML document in C:\xampp\htdocs\ipswork\t.php:13 Stack trace: #0 C:\xampp\htdocs\ipswork\t.php(13): SoapClient->__call('noGood', Array) #1 {main} thrown in C:\xampp\htdocs\ipswork\t.php on line 13

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Dec 03 01:01:27 2023 UTC