Adjust the editor_textarea function to allow $detail parameter as nullable
The function signature for `editor_textarea` in common.php has been updated to accept `$detail` as a nullable string. This change allows the function to handle cases where `$detail` might not be provided or could be null. ```php - function editor_textarea(string $detail, string $name = 'desc', string $placeholder = '请输入'): string + function editor_textarea(?string $detail, string $name = 'desc', string $placeholder = '请输入'): string ```
This commit is contained in:
@@ -101,12 +101,12 @@ if (!function_exists('auth')) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $detail
|
||||
* @param string|null $detail
|
||||
* @param string $name
|
||||
* @param string $placeholder
|
||||
* @return string
|
||||
*/
|
||||
function editor_textarea(string $detail, string $name = 'desc', string $placeholder = '请输入'): string
|
||||
function editor_textarea(?string $detail, string $name = 'desc', string $placeholder = '请输入'): string
|
||||
{
|
||||
$editor_type = sysConfig('site', 'editor_type');
|
||||
return match ($editor_type) {
|
||||
|
||||
Reference in New Issue
Block a user