Skip to content

Commit

Permalink
Fix undefined constant
Browse files Browse the repository at this point in the history
Fix WSDL_CACHE_MEMORY undefined error if php-soap is not installed. php-soap is only needed if using the SOAP-based transport
  • Loading branch information
cwmiller committed Nov 28, 2023
1 parent 3775899 commit 5a1aab4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Ocip/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Options

private $soapClientOptions = [
'encoding' => 'utf-8',
'cache_wsdl' => WSDL_CACHE_MEMORY,
'cache_wsdl' => 0
];

private $sslOptions = [
Expand All @@ -20,6 +20,12 @@ class Options
'allow_self_signed' => false
];

public function __construct() {
if (defined('WSDL_CACHE_MEMORY')) {
$this->soapClientOptions['cache_wsdl'] = WSDL_CACHE_MEMORY;
}
}

/**
* @return string
*/
Expand Down

0 comments on commit 5a1aab4

Please sign in to comment.