simplesamlphp/saml2

SoapClient send() gives Fatal Error: Undefined constant SoapClient::SOAP_1_1

FredKegel opened this issue · 2 comments

When processing an Artifact through the HTTP Artifact binding, SAML2/SOAPClient builds a SoapClient from the global namespace and tries to set the SOAP version on line 134 using a class constant:

$version = BUILTIN_SoapClient::SOAP_1_1;

However, this throws a fatal error since this constant isn't defined in the global class SoapClient. It's a predefined constant which is defined by the extension itself (https://www.php.net/manual/en/soap.constants.php) Actually all the SOAP_* constants are predefined.

This is due to commit 4f5479e (Fix several Psalm-issues) where an alias was added at the top of the file:

use SoapClient as BUILTIN_SoapClient;

Before (prior to 4.2.8) the SOAP version was set with the predefined constant.

Hi @FredKegel ! I've just tagged v4.5.1 to fix this.. Please let me know if the issue is resolved.

Hi Tim,

Thanks for the quick resolution. I can confirm your fix resolves the issue, so it can be closed.