diff --git a/classes/controller/Controller.php b/classes/controller/Controller.php index 7e4ebf6ed..570a5a1e7 100644 --- a/classes/controller/Controller.php +++ b/classes/controller/Controller.php @@ -175,9 +175,9 @@ abstract class ControllerCore // then using displayAjax[action] if ($this->ajax) { - $action = Tools::getValue('action'); - if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action, true))) - $this->{'displayAjax'.$action}(); + $action = 'displayAjax' . Tools::toCamelCase(Tools::getValue('action', true)); + if (!empty($action) && method_exists($this, $action)) + $this->{$action}(); elseif (method_exists($this, 'displayAjax')) $this->displayAjax(); }