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

SessionContext is missing timeout for UserPerson #10

Closed
OGKevin opened this issue Aug 3, 2017 · 4 comments
Closed

SessionContext is missing timeout for UserPerson #10

OGKevin opened this issue Aug 3, 2017 · 4 comments

Comments

@OGKevin
Copy link
Contributor

OGKevin commented Aug 3, 2017

Steps to reproduce:

  1. Make a a call as user person to any endpoint

What happens:

  1. You will get Call to a member function getSessionTimeout() on null.

What should happen:

  1. You don't get the mentioned error.

Extra info:

Traceback

Call to a member function getSessionTimeout() on null
bunq/sdk_php/lib/Context/SessionContext.php:60
bunq/sdk_php/lib/Context/SessionContext.php:48
bunq/sdk_php/lib/Context/ApiContext.php:149
bunq/sdk_php/lib/Context/ApiContext.php:106
 bunq/sdk_php/lib/Context/ApiContext.php:93
 bunq/sdk_php/test/ApiContextHandler.php:36
 bunq/sdk_php/test/Model/Generated/MonetaryAccountBankTest.php:69
@LauLaman
Copy link
Contributor

LauLaman commented Aug 3, 2017

Workaround:
replace this line with:

$expiryTime = microtime(true) + 1500;

@basst85
Copy link

basst85 commented Aug 3, 2017

Or replace with $expiryTime = microtime(true) + $sessionServer->getUserPerson()->getSessionTimeout(); as workaround.

I think there has to be a check what is used, UserCompany, UserPerson or UserLight

@OGKevin
Copy link
Contributor Author

OGKevin commented Aug 4, 2017

@basst85 Yep, that is indeed the correct workaround in case your using an UserPerson. We indeed forgot to put the check in the PHP SDK. We are looking into it 👍

@OGKevin OGKevin added this to the Patch 0.9.1 milestone Aug 4, 2017
@dnl-blkv
Copy link
Contributor

dnl-blkv commented Aug 7, 2017

This has been fixed in the latest version.

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

No branches or pull requests

4 participants