From 30899af7b84b050a47f44a26959c25f0e33c8526 Mon Sep 17 00:00:00 2001 From: lubosdz Date: Tue, 8 Aug 2023 11:05:47 +0200 Subject: [PATCH] fix PHP 8.2 error "Passing null to parameter is deprecated" --- framework/web/CClientScript.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/web/CClientScript.php b/framework/web/CClientScript.php index 71a3b66e0d..1b3d7ae2c9 100644 --- a/framework/web/CClientScript.php +++ b/framework/web/CClientScript.php @@ -411,7 +411,7 @@ public function renderHead(&$output) if($html!=='') { $count=0; - $output=preg_replace('/(]*>|<\\/head\s*>)/is','<###head###>$1',$output,1,$count); + $output=preg_replace('/(]*>|<\\/head\s*>)/is','<###head###>$1',(string)$output,1,$count); if($count) $output=str_replace('<###head###>',$html,$output); else @@ -442,7 +442,7 @@ public function renderBodyBegin(&$output) if($html!=='') { $count=0; - $output=preg_replace('/(]*>)/is','$1<###begin###>',$output,1,$count); + $output=preg_replace('/(]*>)/is','$1<###begin###>',(string)$output,1,$count); if($count) $output=str_replace('<###begin###>',$html,$output); else @@ -461,7 +461,7 @@ public function renderBodyEnd(&$output) return; $fullPage=0; - $output=preg_replace('/(<\\/body\s*>)/is','<###end###>$1',$output,1,$fullPage); + $output=preg_replace('/(<\\/body\s*>)/is','<###end###>$1',(string)$output,1,$fullPage); $html=''; if(isset($this->scriptFiles[self::POS_END])) {