commit 5a8d1159e6b9ac660c575c70fae7ea0db8dbc79d
parent 1bb14fb3c6b87f6e91909f43bf5a4319fc3ea4ce
Author: Jan Dankert <develop@jandankert.de>
Date: Mon, 6 May 2019 20:42:59 +0200
Kompatibilität zu PHP 5.5: Klassenkonstanten können keine Arrays enthalten.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/util/Mustache.class.php b/modules/util/Mustache.class.php
@@ -296,7 +296,8 @@ class MustacheTag
const BLOCK_VAR = '$';
const VARIABLE = '';
- const VALID_TYPES = array(
+
+ private $VALID_TYPES = array(
self::CLOSING, self::NEGATION, self::SECTION, self::COMMENT, self::PARTIAL, self::PARENT, self::DELIM_CHANGE, self::UNESCAPED_2, self::UNESCAPED, self::PRAGMA, self::BLOCK_VAR
);
@@ -322,7 +323,7 @@ class MustacheTag
private function parseTag($tagText)
{
$t = substr($tagText, 0, 1);
- if (in_array($t, self::VALID_TYPES)) {
+ if (in_array($t, $this->VALID_TYPES)) {
$this->type = $t;
$property = substr($tagText, 1);
$this->propertyName = trim($property);