浏览代码

Fix potential problem where parsers array is not initialized when template string is parsed

Nathaniel van Diepen 7 年之前
父节点
当前提交
55077031cd
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      Data/template.class.php

+ 4 - 0
Data/template.class.php

@@ -273,6 +273,10 @@
 			return $output;
 		}
 		public static function parse(string $template, $data) : string{
+			if(is_null(static::$parsers)){
+				// Force parsers to be added
+				new Template(uuid(), $template);
+			}
 			$ignored = [];
 			$output = $template;
 			// Handle {#ignore code}