I am returning to an old project that I created using Riot Games API but had to update the wrapper I was using (https://github.com/kevinohashi/php-riot-api) - my test enviornment is http://sutsurikeru.com/fallingmoon/ - all errors are outputted here.
Everything worked a treat befre updating the wrapper, but this was some time ago and Riot's API has changed since as well.
Firstly I get the following:
Warning: Invalid argument supplied for foreach() in /home/sites
/sutsurikeru.com/public_html/fallingmoon/index.php on line 50
which relates to following:
//sorts by number of league points
foreach($array as $key => $league){
usort($array[$key]['entries'], function($a,$b){
return $a['leaguePoints'] - $b['leaguePoints'];
});
}
If there is something I have overlooked, any advice is greatly appreciated!
Full pastebin of my script: http://pastebin.com/9JzNSvcU