diff --git a/sources/Application/TwigBase/Controller/Controller.php b/sources/Application/TwigBase/Controller/Controller.php index 87763a40a..954c31938 100644 --- a/sources/Application/TwigBase/Controller/Controller.php +++ b/sources/Application/TwigBase/Controller/Controller.php @@ -35,6 +35,7 @@ use ReflectionClass; use SetupPage; use SetupUtils; use Twig\Error\Error; +use Twig\Error\SyntaxError; use utils; use WebPage; use ZipArchive; @@ -662,6 +663,9 @@ abstract class Controller extends AbstractController { return $this->m_oTwig->render($sName.'.'.$sTemplateFileExtension.'.twig', $aParams); } + catch (SyntaxError $e) { + IssueLog::Error($e->getMessage().' - file: '.$e->getFile().'('.$e->getLine().')'); + } catch (Error $e) { if (strpos($e->getMessage(), 'Unable to find template') === false) { diff --git a/tests/php-unit-tests/src/BaseTestCase/ItopDataTestCase.php b/tests/php-unit-tests/src/BaseTestCase/ItopDataTestCase.php index 63ddbff9b..422dd357e 100644 --- a/tests/php-unit-tests/src/BaseTestCase/ItopDataTestCase.php +++ b/tests/php-unit-tests/src/BaseTestCase/ItopDataTestCase.php @@ -146,6 +146,8 @@ abstract class ItopDataTestCase extends ItopTestCase EventService::UnRegisterListener($sListenerId); } + CMDBObject::SetCurrentChange(null); + parent::tearDown(); }