mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-22 17:12:30 +01:00
fix(transformers): force object type for properties (#4544)
This commit is contained in:
parent
c3521e0221
commit
634c9353e3
@ -47,10 +47,10 @@ class ActivityLogTransformer extends BaseClientTransformer
|
|||||||
* Transforms any array values in the properties into a countable field for easier
|
* Transforms any array values in the properties into a countable field for easier
|
||||||
* use within the translation outputs.
|
* use within the translation outputs.
|
||||||
*/
|
*/
|
||||||
protected function properties(ActivityLog $model): array
|
protected function properties(ActivityLog $model): object
|
||||||
{
|
{
|
||||||
if (!$model->properties || $model->properties->isEmpty()) {
|
if (!$model->properties || $model->properties->isEmpty()) {
|
||||||
return [];
|
return (object) [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$properties = $model->properties
|
$properties = $model->properties
|
||||||
@ -76,7 +76,7 @@ class ActivityLogTransformer extends BaseClientTransformer
|
|||||||
$properties = $properties->merge(['count' => $properties->get($keys[0])])->except($keys[0]);
|
$properties = $properties->merge(['count' => $properties->get($keys[0])])->except($keys[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $properties->toArray();
|
return (object) $properties->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user