From 6c808abcfc9a52f8f331f9bfb58a455a90d1970d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 31 Jan 2022 09:49:00 +0100 Subject: PHP 8.1 band-aid --- Zotlabs/Render/Comanche.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Render') diff --git a/Zotlabs/Render/Comanche.php b/Zotlabs/Render/Comanche.php index 5ce05243b..230c2455e 100644 --- a/Zotlabs/Render/Comanche.php +++ b/Zotlabs/Render/Comanche.php @@ -572,7 +572,7 @@ class Comanche { require_once('widget/' . trim($name) . '.php'); elseif(file_exists('widget/' . trim($name) . '/' . trim($name) . '.php')) require_once('widget/' . trim($name) . '/' . trim($name) . '.php'); - + if(! function_exists($func)) { $theme_widget = $func . '.php'; if(theme_include($theme_widget)) { @@ -640,7 +640,8 @@ class Comanche { $cnt = preg_match_all("/\[widget=(.*?)\](.*?)\[\/widget\]/ism", $s, $matches, PREG_SET_ORDER); if($cnt) { foreach($matches as $mtch) { - $s = str_replace($mtch[0],$this->widget(trim($mtch[1]),$mtch[2]),$s); + + $s = str_replace((string)$mtch[0], (string)$this->widget(trim((string)$mtch[1]), (string)$mtch[2]), $s); } } -- cgit v1.2.3