View Issue Details

IDProjectCategoryView StatusLast Update
0001629XdebugUncategorizedpublic2019-02-15 15:11
ReporterNikolay_Z Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Platform*OS*OS Version7
Product Version2.7.0rc1 
Target Version2.7.0Fixed in Version2.7.0RC2 
Summary0001629: SOAP Client/Server detection code does not handle inherited classes
Description

https://bugs.php.net/bug.php?id=77601

Steps To Reproduce

<?php
class SoapAgent extends \SoapClient
{
public function construct(string $wsdl)
{
try {
parent::
construct($wsdl);
echo 'Success!' . PHP_EOL;
} catch (\Throwable $t) {
var_dump($t);
}
}
}

$client = new SoapAgent('test');

Expected result:

var_dump() of the Throwable object.

Actual result:

Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'test' : failed to load external entity "test"

Process finished with exit code 255

Additional Information

If XDebug is disabled in php.ini - soap client work as expected

TagsNo tags attached.
Operating SystemWindows
PHP Version7.3.0-7.3.1

Activities

derick

2019-02-11 10:42

administrator   ~0004878

This is specifically related to just SOAP classes. The soap extension overloads the PHP error handler to be able to throw exceptions, and as Xdebug uses it's own overloaded PHP error handler, this conflicts. This is why Xdebug tries to detect whether a SoapClient or SoapServer is a class in the error, and restores the original error handler (SOAP's). However, Xdebug does not deal with when an inherited class of SoapClient/SoapServer is used.

derick

2019-02-11 10:43

administrator   ~0004879

I have a working patch, and running tests now to see if this breaks nothing else.

derick

2019-02-11 15:21

administrator   ~0004880

Fixed in GIT — thanks for the report!

Nikolay_Z

2019-02-11 15:33

reporter   ~0004881

Thank you!