Update HabboBadgeColumn.php

This commit is contained in:
Remco
2026-01-19 23:27:25 +01:00
parent 1d3f30e43d
commit 2c48253924
@@ -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 : '';
}
}