Skip to content

Commit f3bde70

Browse files
Merge pull request #3 from anglerfox/github-sakshi-jain-patch-1
Set default prestashop version when not defined
2 parents d0f4939 + 13482b1 commit f3bde70

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/PrestashopWebServiceLibrary.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,9 @@ protected function executeRequest($url, $curl_params = array())
178178
}
179179

180180
if (array_key_exists('PSWS-Version', $headerArray)) {
181-
$this->isPrestashopVersionSupported($headerArray['PSWS-Version']);
182-
$this->version = $headerArray['PSWS-Version'];
181+
$version = $headerArray['PSWS-Version'] == 0 ? '1.7.5.1' : $headerArray['PSWS-Version'];
182+
$this->isPrestashopVersionSupported($version);
183+
$this->version = $version;
183184
}
184185

185186
$this->printDebug('HTTP REQUEST HEADER', $info['request_header']);

0 commit comments

Comments
 (0)