소스 검색

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}