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:
wolfcode
2024-06-18 17:36:23 +08:00
parent 417a834593
commit df3571534c

View File

@@ -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) {