getStaticChampion error
Closed this issue · 1 comments
IgorsKolcins commented
Describe the bug
When I try to get static champion data error occurs.
To Reproduce
Steps to reproduce the behavior:
- Run this code:
$api = new LeagueAPI([ LeagueAPI::SET_KEY => 'MY_KEY', LeagueAPI::SET_REGION => Region::EUROPE_EAST, ]); $api->getStaticChampion(61);
- See error:
Argument 1 passed to RiotAPI\LeagueAPI\Objects\ApiObject::__construct() must be of the type array, boolean given, called in /var/www/thekingeagle/public/vendor/dolejska-daniel/riot-api/src/LeagueAPI/LeagueAPI.php on line 1809
Server:
- PHP version: 7.2
IgorsKolcins commented
Well, I found a problem.
This was a permission issue on my server.
You must give write permission for the folder ./vendor/dolejska-daniel/riot-api/src/DataDragonAPI
because the cache
folder cannot be created (or create cache
folder and give write permissions for cache
folder).
The error was in this file: RiotAPI\DataDragonAPI\DataDragonAPI::saveSataicData