riot-api icon indicating copy to clipboard operation
riot-api copied to clipboard

Local DDragon error 500

Open FlorianMifsud opened this issue 3 years ago • 0 comments

Describe the bug A clear and concise description of what the bug is. I tried to put the CDN local as in issue 66 but I have an error when I put a personalized URL, the version is equal to "last" to avoid modifying my code at each DDragon update Expected behavior My code: DataDragonAPI::initByVersion(version_cdn, [ DataDragonAPI::SET_ENDPOINT => 'https://cdn.l2p.lol/riot/', ]);

Server (please complete the following information):

  • PHP version: 7.4

Additional context Error apache: Trying to access array offset on value of type null in function.php on line 159PHP message: PHP Fatal error: Uncaught RiotAPI\\LeagueAPI\\Exceptions\\RequestException: Failed to load static-data for URL: 'https://ddragon.leagueoflegends.com/cdn/last/data/en_US/champion.json#by-key'. in /var/www/html/L2P/php/vendor/dolejska-daniel/riot-api/src/LeagueAPI/LeagueAPI.php:1945\nStack trace:\n#0 /var/www/html/L2P/php/vendor/dolejska-daniel/riot-api/src/LeagueAPI/LeagueAPI.php(1994): RiotAPI\\LeagueAPI\\LeagueAPI->_makeStaticCall()\n#1 /var/www/html/L2P/pages/user/profil.php(121): RiotAPI\\LeagueAPI\\LeagueAPI->getStaticChampion()\n#2 /var/www/html/L2P/index.php(214): include('/var/www/html/L...')\n#3 {main}\n thrown in /var/www/html/L2P/php/vendor/dolejska-daniel/riot-api/src/LeagueAPI/LeagueAPI.php on line 1945'

FlorianMifsud avatar Aug 08 '20 13:08 FlorianMifsud