Open StreakyCat opened 9 years ago
Using the getSummonerId with summoner names that contain special characters (á,é,î,ô,ý...) results in NOT FOUND. A fix would be:
$query = "Summoner name with special chars á,é,î,ô,ý" ; $query = utf8_decode($query) ;
Now you can safely pass your $query to getSummonerId($query):
function getSummonerId($query) { global $api; try { $r = $api->getSummonerId($sum_name); return json2array($r); } catch(Exception $e) { echo "Error: " . $e->getMessage(); return null; }; }
Inside your php-riot-api.php you have to modify $call inside function getSummonerByName($name):
public function getSummonerByName($name) { //OLD $call = 'summoner/by-name/' . rawurlencode($name); $call = 'summoner/by-name/' . rawurlencode(utf8_encode($name)); //add API URL to the call $call = self::API_URL_1_4 . $call; return $this->request($call); }
Using the getSummonerId with summoner names that contain special characters (á,é,î,ô,ý...) results in NOT FOUND. A fix would be:
$query = "Summoner name with special chars á,é,î,ô,ý" ; $query = utf8_decode($query) ;
Now you can safely pass your $query to getSummonerId($query):
Inside your php-riot-api.php you have to modify $call inside function getSummonerByName($name):