From 2b13737e9299317c865f72f4a276ea0b733c4f5f Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Mon, 2 Sep 2019 17:14:43 +0200 Subject: Make itools a bit stricter, new PHP versions start to enforce more declarations --- it_text.class | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'it_text.class') diff --git a/it_text.class b/it_text.class index 443b34b..660213e 100644 --- a/it_text.class +++ b/it_text.class @@ -172,7 +172,7 @@ function text($label, $language = null) */ function etext($label, $values = null, $language = null) { - return $this->transmogrify($this->text($label, $language), $values, $label, $this->allowedfuncs); + return self::transmogrify($this->text($label, $language), $values, $label, $this->allowedfuncs); } @@ -231,7 +231,7 @@ function set($label, $text = null, $language = null) * Replaces variables of the form {obj.var} with value from $values, e.g. {user.name}, or result of a func, e.g. {LU(//www/terms)} * NOTE: Invalid object names or non-existing variables are simply deleted. */ -function transmogrify($text, $values = null, $label = null, $allowedfuncs = null) +static function transmogrify($text, $values = null, $label = null, $allowedfuncs = null) { foreach (preg_split('#{([^}]*)}#', $text, -1, PREG_SPLIT_DELIM_CAPTURE) as $i => $part) { -- cgit v1.2.3