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

setcookie() is passed a null instead of 0/[] during OAuth Callback. #291

Closed
1 task done
da-mask opened this issue Jul 25, 2023 · 5 comments · May be fixed by #293
Closed
1 task done

setcookie() is passed a null instead of 0/[] during OAuth Callback. #291

da-mask opened this issue Jul 25, 2023 · 5 comments · May be fixed by #293
Labels

Comments

@da-mask
Copy link

da-mask commented Jul 25, 2023

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 for expires: 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 to 0 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

  1. OAuth::begin( shop: $this->shop->url, redirectPath: $this->redirectUri, isOnline: false, );
  2. $session = OAuth::callback( cookies: $cookies, query: $get ); $accessToken = $session->getAccessToken();

Checklist

  • I have described this issue in a way that is actionable (if possible)
@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale label Sep 23, 2023
@github-actions
Copy link

github-actions bot commented Oct 7, 2023

We are closing this issue because it has been inactive for a few months.
This probably means that it is not reproducible or it has been fixed in a newer version.
If it’s an enhancement and hasn’t been taken on since it was submitted, then it seems other issues have taken priority.

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!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2023
@erika89
Copy link

erika89 commented Mar 7, 2024

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.

@da-mask
Copy link
Author

da-mask commented Mar 8, 2024

Hey @erika89 , I can't really remember. I'm guessing you've looked at my associated PRs? Were they any help?

@erika89
Copy link

erika89 commented Mar 8, 2024

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.
Thanks a lot!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants