diff --git a/system/typemill/Controllers/ControllerApiSystemUsers.php b/system/typemill/Controllers/ControllerApiSystemUsers.php index bbc9146..cd04799 100644 --- a/system/typemill/Controllers/ControllerApiSystemUsers.php +++ b/system/typemill/Controllers/ControllerApiSystemUsers.php @@ -236,7 +236,7 @@ class ControllerApiSystemUsers extends Controller { $response->getBody()->write(json_encode([ 'message' => Translations::translate('Please correct your input.'), - 'errors' => $validateErrors + 'errors' => $validate->errors ])); return $response->withHeader('Content-Type', 'application/json')->withStatus(400); diff --git a/system/typemill/Plugin.php b/system/typemill/Plugin.php index 78c5a85..018e3da 100644 --- a/system/typemill/Plugin.php +++ b/system/typemill/Plugin.php @@ -186,19 +186,19 @@ abstract class Plugin implements EventSubscriberInterface protected function addTwigGlobal($name, $class) { - $this->container->view->getEnvironment()->addGlobal($name, $class); + $this->container->get('view')->getEnvironment()->addGlobal($name, $class); } protected function addTwigFilter($name, $filter) { $filter = new \Twig_SimpleFilter($name, $filter); - $this->container->view->getEnvironment()->addFilter($filter); + $this->container->get('view')->getEnvironment()->addFilter($filter); } protected function addTwigFunction($name, $function) { $function = new \Twig_SimpleFunction($name, $function); - $this->container->view->getEnvironment()->addFunction($function); + $this->container->get('view')->getEnvironment()->addFunction($function); } protected function addJS($JS)