Skip to content

Conversation

@CapaciousCore
Copy link

Now truly returns boolean because it is the difference between if($openid->validate()) and if($openid->validate() === true) :) Alternative for this is type casting.

Now truly returns boolean because it is the difference between if($openid->validate()) and if($openid->validate() === true) :) Alternative for this is type casting.
$response = $this->request($server, 'POST', $params);

return preg_match('/is_valid\s*:\s*true/i', $response);
return preg_match('/is_valid\s*:\s*true/i', $response) === 1;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

=== true; may be?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kinda pointless when you can do if (1) echo "true";

Live example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants