diff --git a/Updated_Cms/app/Filament/Tables/Columns/HabboBadgeColumn.php b/Updated_Cms/app/Filament/Tables/Columns/HabboBadgeColumn.php index 15f15064a3..941fd2820e 100644 --- a/Updated_Cms/app/Filament/Tables/Columns/HabboBadgeColumn.php +++ b/Updated_Cms/app/Filament/Tables/Columns/HabboBadgeColumn.php @@ -13,21 +13,23 @@ class HabboBadgeColumn extends Column implements HasBadge { $record = $this->getRecord(); - if (! method_exists($record, 'getBadgePath')) { + if (! is_object($record) || ! method_exists($record, 'getBadgePath')) { return ''; } - return $record->getBadgePath(); + $path = $record->getBadgePath(); + return is_string($path) ? $path : ''; } public function getBadgeName(): string { $record = $this->getRecord(); - if (! method_exists($record, 'getBadgeName')) { + if (! is_object($record) || ! method_exists($record, 'getBadgeName')) { return ''; } - return $record->getBadgeName(); + $name = $record->getBadgeName(); + return is_string($name) ? $name : ''; } }