Open
Description
Experiencing Invalid argument supplied for foreach() when I attempt to register with GitHub. Here is the function:
/**
* Get the primary, verified email address from the Github data.
*
* @param mixed $emails
* @return mixed
*/
protected function getPrimaryEmail($emails)
{
foreach ($emails as $email) {
if (! $email->primary) {
continue;
}
if ($email->verified) {
return $email->email;
}
throw new GithubEmailNotVerifiedException;
}
return null;
}
Metadata
Metadata
Assignees
Labels
No labels