Tustin / psn-php

A PHP wrapper for the PSN API
https://tustin.dev/psn-php/
MIT License
354 stars 73 forks source link

Fatal error on a psnId for just 1 game #228

Closed Reuns closed 1 year ago

Reuns commented 1 year ago

Hi !

I have an issue with a psnId on a specific game ! When I try to get lastPlayedDateTime I've got this fatal error. Other games works great, but not this game for this psnId. obviously it'll break my loop.

Do you have any idea @Tustin ?

Fatal error: Uncaught Error: Typed property Tustin\PlayStation\Model::$factory must not be accessed before initialization in /home/brre5190/public_html/scoring.high-score.fr/core/vendor/tustin/psn-php/src/Model.php:136
Stack trace:
#0 /home/brre5190/public_html/scoring.high-score.fr/core/vendor/tustin/psn-php/src/Model/GameTitle.php(178): Tustin\PlayStation\Model->getFactory()
#1 /home/brre5190/public_html/scoring.high-score.fr/core/vendor/tustin/psn-php/src/Model.php(42): Tustin\PlayStation\Model\GameTitle->fetch()
#2 /home/brre5190/public_html/scoring.high-score.fr/core/vendor/tustin/psn-php/src/Model.php(69): Tustin\PlayStation\Model->performFetch()
#3 /home/brre5190/public_html/scoring.high-score.fr/core/vendor/tustin/psn-php/src/Model/GameTitle.php(70): Tustin\PlayStation\Model->pluck()
#4 /home/brre5190/public_html/scoring.high-score.fr/tasks/importPsn/importPsn.php(1995): Tustin\PlayStation\Model\GameTitle->lastPlayedDateTime()

thrown in /home/brre5190/public_html/scoring.high-score.fr/core/vendor/tustin/psn-php/src/Model.php on line 136
Reuns commented 1 year ago

Oh wait ... This isn't about a specific game. Actually, there is no game after that. Huuum. It'll stop without errors for others psnId but this one ... I don't undertstand.