PokeGOAPI-PHP icon indicating copy to clipboard operation
PokeGOAPI-PHP copied to clipboard

Every first time get pokemon information this will happend

Open milowei opened this issue 9 years ago • 3 comments

$PokemonGoAPI->getInventories()->getPokeBank()->getPokemonById(\POGOProtos\Enums\PokemonId::PIDGEY);

Fatal error: Uncaught Error: Call to a member function getInventoryItemsArray() on null in /Applications/XAMPP/xamppfiles/htdocs/pkg2/src/PokemonGoAPI/Api/Inventory/Inventories.php:68 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/pkg2/src/PokemonGoAPI/Api/PokemonGoAPI.php(49): PokemonGoAPI\Api\Inventory\Inventories->updateInventories(false) #1 /Applications/XAMPP/xamppfiles/htdocs/pkg2/examples/CheckPidgeyExample.php(20): PokemonGoAPI\Api\PokemonGoAPI->__construct(Array) #2 /Applications/XAMPP/xamppfiles/htdocs/pkg2/examples/CheckPidgeyExample.php(41): CheckPidgeyExample->run() #3 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/pkg2/src/PokemonGoAPI/Api/Inventory/Inventories.php on line 68

After I refresh the page and this will be fixed;

milowei avatar Jul 30 '16 14:07 milowei

What is your php version? This happen everytime?

tuttarealstep avatar Jul 30 '16 17:07 tuttarealstep

php 7, not every time, After about 3-5 min or change another account to login this will be happend

milowei avatar Jul 30 '16 21:07 milowei

Now I check the same code and if this happen to me too.

tuttarealstep avatar Jul 31 '16 09:07 tuttarealstep