Closed Reuns closed 1 year ago
I switched from using a 3rd party enum library to using native enums that were added in PHP 8.1. They should be working identically to the old version. Are you trying to store that value somewhere?
I'm getting to store it yes.
But I don't know how to use this enum system.
I have a fatal error on my script, on this line $platforms .= $virg.$platform;
Fatal error: Uncaught Error: Object of class Tustin\PlayStation\Enum\ConsoleType could not be converted to string in [...]
Try using $platform->value
. This should return the string that you are expecting.
As simple as that ... I feel so ashamed to bother you with that kind of question.
It works perfectly. Everything else seems to work well too !
Once again : thank you for your help.
No worries. It's my fault for randomly changing the format 😛. Glad I could help.
Since last update, when I tried to get the platform of a game
I don't have
PS5
anymore butenum(Tustin\PlayStation\Enum\ConsoleType::PS5)
I don't understand what's the purpose to this. Is it a mistake ? Could you revert it back please ? @Tustin
Thanks