Fix var not defined
This commit is contained in:
parent
74454c3766
commit
b6adfed070
@ -254,6 +254,7 @@ class PrestaShopWebservice
|
|||||||
public function add($options)
|
public function add($options)
|
||||||
{
|
{
|
||||||
$xml = '';
|
$xml = '';
|
||||||
|
$url = '';
|
||||||
|
|
||||||
if (isset($options['resource'], $options['postXml']) || isset($options['url'], $options['postXml']))
|
if (isset($options['resource'], $options['postXml']) || isset($options['url'], $options['postXml']))
|
||||||
{
|
{
|
||||||
@ -265,7 +266,9 @@ class PrestaShopWebservice
|
|||||||
$url .= '&id_group_shop='.$options['id_group_shop'];
|
$url .= '&id_group_shop='.$options['id_group_shop'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
throw new PrestaShopWebserviceException('Bad parameters given');
|
throw new PrestaShopWebserviceException('Bad parameters given');
|
||||||
|
}
|
||||||
$request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => $xml));
|
$request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => $xml));
|
||||||
|
|
||||||
self::checkStatusCode($request['status_code']);
|
self::checkStatusCode($request['status_code']);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user