Skip to content

Commit 4ab5578

Browse files
committed
Remove ajaxDie
1 parent 4c127ba commit 4ab5578

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

controllers/admin/AdminGanalyticsAjax.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ public function init()
3131

3232
if (Validate::isLoadedObject($order) && (isset($this->context->employee->id) && $this->context->employee->id)) {
3333
(new GanalyticsRepository())->markOrderAsSent((int) $orderId);
34-
$this->ajaxDie('OK');
34+
$this->ajaxRender('OK');
3535
}
3636

37-
$this->ajaxDie('KO');
37+
$this->ajaxRender('KO');
3838
}
3939
}

controllers/front/ajax.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ public function initContent()
3535
$order = new Order($orderId);
3636

3737
if (!Validate::isLoadedObject($order) || $order->id_customer != (int) Tools::getValue('customer')) {
38-
$this->ajaxDie('KO');
38+
$this->ajaxRender('KO');
3939
}
4040

4141
(new GanalyticsRepository())->markOrderAsSent((int) $orderId);
4242

43-
$this->ajaxDie('OK');
43+
$this->ajaxRender('OK');
4444
}
4545
}

tests/phpstan/phpstan-1.7.7.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ parameters:
66
- '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#'
77
- '#Access to an undefined property Cookie\:\:\$ga_admin_order.#'
88
- '#Access to an undefined property Cookie\:\:\$ga_admin_refund.#'
9+
- '#Parameter \#1 \$value of method ControllerCore::ajaxRender\(\) expects null, string given.#'

0 commit comments

Comments
 (0)