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

in_array usage? #74

Closed
krmgns opened this issue Mar 5, 2013 · 1 comment
Closed

in_array usage? #74

krmgns opened this issue Mar 5, 2013 · 1 comment

Comments

@krmgns
Copy link

krmgns commented Mar 5, 2013

Why do you use in_array like this (without needle);

public static function isSafeMethod($method)
{
    return in_array(self::safeMethods());
}

I think it should be like this;

public static function isSafeMethod($method)
{
    return in_array($method, self::safeMethods());
}

Links;
https://github.com/nategood/httpful/blob/master/src/Httpful/Http.php#L31
https://github.com/nategood/httpful/blob/master/src/Httpful/Http.php#L40

@nategood
Copy link
Owner

nategood commented Mar 6, 2013

Looks like you found a bug :-)

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

No branches or pull requests

2 participants