mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
fix(discord): convert stringables on formatting (#975)
This commit is contained in:
@@ -10,6 +10,7 @@ use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Str;
|
||||
use JsonSerializable;
|
||||
use Stringable;
|
||||
|
||||
class DiscordEmbedField implements Arrayable, JsonSerializable
|
||||
{
|
||||
@@ -78,7 +79,7 @@ class DiscordEmbedField implements Arrayable, JsonSerializable
|
||||
}
|
||||
|
||||
// Encode to json for all other non-empty scalar values
|
||||
if (is_scalar($value) && Str::length($value) > 0) {
|
||||
if ((is_scalar($value) || $value instanceof Stringable) && Str::length($value) > 0) {
|
||||
return strval($value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user