兼容php8.1

This commit is contained in:
augushong
2024-05-09 18:22:55 +08:00
parent eb4973d689
commit b51d1ad7a3

View File

@@ -1695,7 +1695,7 @@ class BuildCurdServiceBase
public function replaceTemplate($string, $array = [])
{
foreach ($array as $key => $val) {
$string = str_replace('{{' . $key . '}}', $val, $string);
$string = str_replace('{{' . $key . '}}', $val ?? '', $string);
}
return $string;