invisnik / laravel-steam-auth

Laravel Steam Auth
MIT License
172 stars 67 forks source link

parseSteamID PHP 7.2 #87

Closed atomik closed 6 years ago

atomik commented 6 years ago

pretty sure i'm the only one with this issue, but i thought i'd mention it.

i'm currently running php 7.2.4-1 and recently started getting reports that my auth isn't working.

public function parseSteamID()
    {
        // this line isn't assigning the steamid to $matches.
        preg_match("#^http://steamcommunity.com/openid/id/([0-9]{17,25})#", $this->request->get('openid_claimed_id'), $matches);
        $this->steamId = is_numeric($matches[1]) ? $matches[1] : 0;
    }

this keeps spitting Undefined offset: 1 when trying to assign $matches[1] to $this->steamId. i changed it to a simple explode for now. or is that not a good idea?

public function parseSteamID()
    {
        $this->steamId = explode('/', $this->request->get('openid_claimed_id'))[5];
    }
Gummibeer commented 6 years ago

Do you have the latest version that includes #77 ? It doesn't look so. Steam has switched to https.

atomik commented 6 years ago

yep that would do it.