Skip to content

Commit 72e60c5

Browse files
committed
issue #19 - value should be tested as not null at least
if the value is null, then it should be ignored otherwise it is passed as an argument to the SoapClient in addition, default value should not be tested as not empty as for the passed options but as not null too
1 parent e5f56ff commit 72e60c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AbstractSoapClientBase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ public function initSoapClient(array $options)
6868
$wsdlOptions = [];
6969
$defaultWsdlOptions = static::getDefaultWsdlOptions();
7070
foreach ($defaultWsdlOptions as $optionName => $optionValue) {
71-
if (array_key_exists($optionName, $options)) {
71+
if (array_key_exists($optionName, $options) && !is_null($options[$optionName])) {
7272
$wsdlOptions[str_replace(self::OPTION_PREFIX, '', $optionName)] = $options[$optionName];
73-
} elseif (!empty($optionValue)) {
73+
} elseif (!is_null($optionValue)) {
7474
$wsdlOptions[str_replace(self::OPTION_PREFIX, '', $optionName)] = $optionValue;
7575
}
7676
}

0 commit comments

Comments
 (0)