mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-14 11:20:53 +08:00
Fix: Handle null content in PlanResource::formatContent method
- Fix deprecated warning when passing null to str_replace() function\n- Use null coalescing operator to provide empty string as default value\n- Comply with PHP 8.2+ type requirements
This commit is contained in:
@@ -80,7 +80,7 @@ class PlanResource extends JsonResource
|
||||
*/
|
||||
protected function formatContent(): string
|
||||
{
|
||||
$content = $this->resource['content'];
|
||||
$content = $this->resource['content'] ?? '';
|
||||
|
||||
$replacements = [
|
||||
'{{transfer}}' => $this->resource['transfer_enable'],
|
||||
|
||||
Reference in New Issue
Block a user