diff --git a/CHANGELOG-2.2.md b/CHANGELOG-2.2.md index 32cbed31d..e014a6cf7 100644 --- a/CHANGELOG-2.2.md +++ b/CHANGELOG-2.2.md @@ -82,3 +82,4 @@ - [#3692](https://github.com/hyperf/hyperf/pull/3692) Fixed bug that class proxies couldn't be included when building phar. - [#3769](https://github.com/hyperf/hyperf/pull/3769) Fixed bug that `config-center` conflicts with `metrics`. - [#3770](https://github.com/hyperf/hyperf/pull/3770) Fixed type error when using `Str::slug()`. +- [#3788](https://github.com/hyperf/hyperf/pull/3788) Fixed type error when using `BladeCompiler::getRawPlaceholder()`. diff --git a/src/view-engine/src/Compiler/BladeCompiler.php b/src/view-engine/src/Compiler/BladeCompiler.php index c9402f68a..589174a4c 100644 --- a/src/view-engine/src/Compiler/BladeCompiler.php +++ b/src/view-engine/src/Compiler/BladeCompiler.php @@ -591,7 +591,7 @@ class BladeCompiler extends Compiler implements CompilerInterface */ protected function getRawPlaceholder($replace): string { - return str_replace('#', $replace, '@__raw_block_#__@'); + return str_replace('#', (string) $replace, '@__raw_block_#__@'); } /**