Browse Source

dev 2020-10

Max F 5 years ago
parent
commit
9ae47102dc
1 changed files with 6 additions and 6 deletions
  1. 6 6
      src/Templates/LightweightTemplate.php

+ 6 - 6
src/Templates/LightweightTemplate.php

@@ -149,17 +149,17 @@ class LightweightTemplate {
 		if (defined('ENV') && ENV == 'dev') {
 			$tpl_infos = '';
 			if ($caller_file) {
-				$tpl_infos .= 'layout for ' . $caller_file . '';
+				$tpl_infos .= ' layout for ' . $caller_file . '';
 			}
 			if ($parent_file) {
-				$tpl_infos .= 'child of ' . $parent_file . '';
+				$tpl_infos .= ' child of ' . $parent_file . '';
 			}
 			if ($layout) {
-				$tpl_infos .= 'with layout ' . $layout . '';
+				$tpl_infos .= ' with layout ' . $layout . '';
 			}
 
-			$begin = '<!-- BEGIN TEMPLATE #' . $tpl_idx . ' : ' . $file . ' (size: ' . formatSize(strlen($code)) . ' - ' . $tpl_infos . ') -->';
-			$end = '<!-- END TEMPLATE #' . $tpl_idx . ' : ' . $file . ' (size: ' . formatSize(strlen($code)) . ' - ' . $tpl_infos . ') -->';
+			$begin = '<!-- BEGIN TEMPLATE #' . $tpl_idx . ' : ' . $file . ' (size: ' . formatSize(strlen($code)) . ' -' . $tpl_infos . ') -->';
+			$end = '<!-- END TEMPLATE #' . $tpl_idx . ' : ' . $file . ' (size: ' . formatSize(strlen($code)) . ' -' . $tpl_infos . ') -->';
 
 			$code = PHP_EOL . $begin . PHP_EOL . $code . PHP_EOL . $end . PHP_EOL;
 		}
@@ -210,7 +210,7 @@ class LightweightTemplate {
 		return $code;
 	}
 
-	protected static function compileEchos($code, $strict=false) {
+	protected static function compileEchos($code, $strict=true) {
 		// compile PHP variables
 		if ($strict) {
 			$code = preg_replace('~\{\$(.+?)}~is', '<?php echo \$$1 ?>', $code);