diff options
author | Christian Schneider | 2019-09-02 17:14:43 +0200 |
---|---|---|
committer | Christian Schneider | 2019-09-02 17:14:43 +0200 |
commit | 2b13737e9299317c865f72f4a276ea0b733c4f5f (patch) | |
tree | b800cc0e889d976ba0957e168df45622aee24ee2 /it_text.class | |
parent | b422951038a66713c18ec4d24ce71a13dd0756a6 (diff) | |
download | itools-2b13737e9299317c865f72f4a276ea0b733c4f5f.tar.gz itools-2b13737e9299317c865f72f4a276ea0b733c4f5f.tar.bz2 itools-2b13737e9299317c865f72f4a276ea0b733c4f5f.zip |
Make itools a bit stricter, new PHP versions start to enforce more declarations
Diffstat (limited to 'it_text.class')
-rw-r--r-- | it_text.class | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |