diff --git a/src/core/models/CurlModel.php b/src/core/models/CurlModel.php index 1ac583f34907d486486f56b9d3b663d3b8613fe3..6bddbd0d677e7ab1c5c73f312b6397587e204e13 100644 --- a/src/core/models/CurlModel.php +++ b/src/core/models/CurlModel.php @@ -68,6 +68,7 @@ class CurlModel { ValidatorModel::notEmpty($aArgs, ['xmlPostString', 'url', 'soapAction']); ValidatorModel::stringType($aArgs, ['xmlPostString', 'url', 'soapAction']); + ValidatorModel::arrayType($aArgs, ['options']); $opts = [ CURLOPT_URL => $aArgs['url'], @@ -84,6 +85,10 @@ class CurlModel ] ]; + if (!empty($aArgs['options'])) { + $opts = array_merge($opts, $aArgs['options']); + } + $curl = curl_init(); curl_setopt_array($curl, $opts); $rawResponse = curl_exec($curl);