Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update openid.php #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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.
@@ -926,7 +926,7 @@ function validate()

$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