Skip to content

Commit

Permalink
Fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel López committed Aug 22, 2018
1 parent 1dd873f commit 4ca3174
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/PrestashopWebServiceLibrary.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Verinder\PrestashopWebService\Exceptions\PrestashopWebServiceException;
use Verinder\PrestashopWebService\Exceptions\PrestashopWebServiceRequestException;
use SimpleXMLElement;
use \Support\Facades\Log;
use \Illuminate\Support\Facades\Log;
/**
* @package PrestaShopWebService
*/
Expand All @@ -28,7 +28,7 @@ class PrestashopWebServiceLibrary
protected $runningInConsole;

/** @var array compatible versions of PrestaShop WebService */
const PS_COMPATIBLE_VERSION_MIN = '1.4.0.0';
const PS_COMPATIBLE_VERSION_MIN = '1.6.0.0';
const PS_COMPATIBLE_VERSION_MAX = '1.7.99.99';

/**
Expand Down Expand Up @@ -88,7 +88,7 @@ protected function checkRequest($request, $format = 'XML')
500 => 'Internal Server Error',
);

if (isset($messages[$request['status_code']])) {
if (isset($messages[$request['status_code']])) {
$xml = null;
if ($request['response']) {
if ($format === 'XML') {
Expand Down Expand Up @@ -188,6 +188,7 @@ protected function executeRequest($url, $curl_params = array())
if ($curl_params[CURLOPT_CUSTOMREQUEST] == 'PUT' || $curl_params[CURLOPT_CUSTOMREQUEST] == 'POST') {
$this->printDebug('XML SENT', urldecode($curl_params[CURLOPT_POSTFIELDS]));
}
$this->printDebug('RETURN HTTP BODY', $body);
if ($curl_params[CURLOPT_CUSTOMREQUEST] != 'DELETE' && $curl_params[CURLOPT_CUSTOMREQUEST] != 'HEAD') {
$this->printDebug('RETURN HTTP BODY', $body);
}
Expand Down Expand Up @@ -217,6 +218,7 @@ protected function executeCurl($url, array $options = array())
$response = curl_exec($session);

$error = false;
$info = false;
if ($response === false) {
$error = curl_error($session);
} else {
Expand Down Expand Up @@ -476,7 +478,7 @@ public function edit($options)
$url .= '&id_group_shop='.$options['id_group_shop'];
}
if (isset($options['output_format'])) {
$url .= '&output_format='.$options['output_format'];
$url .= '&output_format='.$options['output_format'];
}
} else {
throw new PrestashopWebServiceException('Bad parameters given');
Expand All @@ -485,7 +487,7 @@ public function edit($options)
(isset($options['output_format']) === true)
? $options['output_format']
: 'XML';
$request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_POSTFIELDS => $xml));
$request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_POSTFIELDS => $xml));
$this->checkRequest($request, $outputFormat);
return self::parseResponse($request['response'], $outputFormat);
}
Expand Down

0 comments on commit 4ca3174

Please sign in to comment.