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

getSettings does not return an array #88

Closed
sydseter opened this issue Aug 26, 2015 · 4 comments
Closed

getSettings does not return an array #88

sydseter opened this issue Aug 26, 2015 · 4 comments

Comments

@sydseter
Copy link

This threw me off. I believe getSettings returns an object of the type: OneLogin_Saml2_Settings

see: https://github.com/onelogin/php-saml/blob/master/lib/Saml2/Auth.php#L82

@pitbulk
Copy link
Contributor

pitbulk commented Aug 26, 2015

getSettings returns a OneLogin_Saml2_Settings object.
getValues of OneLogin_Saml_Settings returns an array.

@sydseter
Copy link
Author

@sydseter
Copy link
Author

Actually you are returning av object of the type OneLogin_Saml2_Settings not OneLogin_Saml_Settings.

OneLogin_Saml2_Settings doesn't have getValues only OneLogin_Saml_Settings
has getValues.

https://github.com/onelogin/php-saml/blob/v2.6.0/lib/Saml2/Auth.php#L66

https://github.com/onelogin/php-saml/blob/v2.6.0/lib/Saml2/Auth.php#L76

It's both the case on master and in the 2.6.0 release.

It is also quite confusing to see OneLogin_Saml2_Settings and OneLogin_Saml_Settings used interchangeably in the Saml2 code like here:

https://github.com/onelogin/php-saml/blob/v2.6.0/lib/Saml2/Settings.php#L114

pitbulk added a commit that referenced this issue Aug 28, 2015
@pitbulk
Copy link
Contributor

pitbulk commented Aug 28, 2015

The definition of the method/var was wrong, fixed it.

The OneLogin_Saml2_Auth and the OneLogin_Saml2_Settings constructors expect a $settings var of the type array or of the type OneLogin_Saml_Auth (the settings object of the old php-saml framework, we keep that for compatibility issues, maybe remove it soon).

@pitbulk pitbulk closed this as completed Mar 23, 2016
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