-
Notifications
You must be signed in to change notification settings - Fork 176
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
setcookie() is passed a null instead of 0/[] during OAuth Callback. #291
Comments
This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days. |
We are closing this issue because it has been inactive for a few months. If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the CONTRIBUTING.md file for guidelines Thank you! |
Hi @da-mask , did you solve this issue??? It would be useful for me to know the answer, as i'm having the same problem. |
Hey @erika89 , I can't really remember. I'm guessing you've looked at my associated PRs? Were they any help? |
Yes @da-mask , i saw the PR after commenting this. I manage to solve it by doing the same, and forgot to let you know hehe. |
Issue summary
Write a short description of the issue here ↓
When using the package for OAuth of an offline/not embedded app, the function OAUTH::callback() attempts to use
setcookie()
with a null value forexpires:
parameter.Expected behavior
What do you think should happen?
Either a
0
or empty array[]
should be passed in instead. We could either make sure expiration does not fallback to being null, or change the constructor of OAuthCookie to set its own value to0
if null is passed in.Actual behavior
What actually happens?
setcookie(): Argument #3 ($expires_or_options) must be of type array|int, null given
Steps to reproduce the problem
OAuth::begin( shop: $this->shop->url, redirectPath: $this->redirectUri, isOnline: false, );
$session = OAuth::callback( cookies: $cookies, query: $get ); $accessToken = $session->getAccessToken();
Checklist
The text was updated successfully, but these errors were encountered: