[php-src] Issue #8538: SoapClient can't parse WSDL file correctly

From: Date: Thu, 12 May 2022 01:03:09 +0000
Subject: [php-src] Issue #8538: SoapClient can't parse WSDL file correctly
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241462@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8538
Author: wzgl

### Description

The following code:

```php
<?php
function testsoap()
{
    try {
        $client = new SoapClient('tmp.txt'); 
        $res = $client->__getFunctions();
        var_dump($res);
    } catch (Exception $e) {
        var_dump($e->getMessage());
    }
}

testsoap();

tmp.txt:
[tmp.txt](https://github.com/php/php-src/files/8674203/tmp.txt)

Resulted in this output:
![image](https://user-images.githubusercontent.com/14242762/167970581-83239b51-9a4c-4888-a1eb-2361a9df4e73.png)
```

But I expected this output instead:
![image](https://user-images.githubusercontent.com/14242762/167970915-0070e771-1d81-494a-acd5-b8ed2662b8f1.png)

```

Test:
When I modify the source file ext/soap/php_sdl.c and add debugging information, as shown below:
![image](https://user-images.githubusercontent.com/14242762/167970943-ea1b7663-e393-482f-93bd-bc6fcad49841.png)
I got the result as below:
![image](https://user-images.githubusercontent.com/14242762/167971018-e7f97f18-3776-4ca0-8eb2-e9b463130264.png)
So I think there might be a problem with this line
ctype = strrchr((char*)type->children->content,':');



### PHP Version

PHP 7.3.24

### Operating System

Centos 6.10


Thread (1 message)

  • wzgl
« previous php.bugs (#241462) next »