From d2a2763f4d68af204163ad5a08d25fd451ba2ace Mon Sep 17 00:00:00 2001
From: Benjamin Renard <benjamin.renard@akka.eu>
Date: Wed, 5 Sep 2018 13:59:16 +0200
Subject: [PATCH] Fix test used to know if a templated parameter must be regenerated or not

---
 src/InputOutput/IHMImpl/Tools/IHMParamTemplateClass.php | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/InputOutput/IHMImpl/Tools/IHMParamTemplateClass.php b/src/InputOutput/IHMImpl/Tools/IHMParamTemplateClass.php
index f93fec6..c290e0b 100644
--- a/src/InputOutput/IHMImpl/Tools/IHMParamTemplateClass.php
+++ b/src/InputOutput/IHMImpl/Tools/IHMParamTemplateClass.php
@@ -161,8 +161,7 @@ class IHMParamTemplateClass
 		if (file_exists($dstFilePath)) {
 			$dateModifDst = filemtime($dstFilePath);
 			$dateModifTemplate = filemtime($templatePath);
-			
-			if ($dateModifTemplate != $dateModifDst)
+			if ($dateModifTemplate == $dateModifDst)
 				//no modification - reuse old generated file
 				return $dstFilePath;
 		}
@@ -274,7 +273,7 @@ class IHMParamTemplateClass
 			return;
 		foreach ($arguments as $arg_key => $arg_def) {
 			if (!array_key_exists($arg_key, $template_args))
-				$template_args[$arg_key] = $arg_def->default;
+				$template_args[$arg_key] = $arg_def['default'];
 		}
 	}
 
--
libgit2 0.21.2