Selaa lähdekoodia

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

Nathaniel van Diepen 7 vuotta sitten
vanhempi
commit
55077031cd
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  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}