Skip to content

Check if $ldapConfig['servers'] is set before using it#4

Merged
tvdijen merged 3 commits intosimplesamlphp:masterfrom
nikolas:ldap-servers-check
Aug 30, 2022
Merged

Check if $ldapConfig['servers'] is set before using it#4
tvdijen merged 3 commits intosimplesamlphp:masterfrom
nikolas:ldap-servers-check

Conversation

@nikolas
Copy link
Copy Markdown
Contributor

@nikolas nikolas commented Aug 29, 2022

This fixes an "Undefined index: servers" notice in the typical use case
where you set the ldap config portion of the auth source to an empty
array to disable it.

nikolas and others added 3 commits August 29, 2022 19:04
This fixes an "Undefined index: servers" notice in the typical use case
where you set the ldap config portion of the auth source to an empty
array to disable it.
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 30, 2022

Codecov Report

Merging #4 (84e9228) into master (b357892) will not change coverage.
The diff coverage is 0.00%.

@@            Coverage Diff            @@
##             master       #4   +/-   ##
=========================================
  Coverage     20.00%   20.00%           
  Complexity       30       30           
=========================================
  Files             2        2           
  Lines           110      110           
=========================================
  Hits             22       22           
  Misses           88       88           

@tvdijen
Copy link
Copy Markdown
Member

tvdijen commented Aug 30, 2022

Thanks @nikolas !
I've taken the opportunity to slightly change the way we deal with this setting.
I think disabling something by setting it to null makes more sense than to set it to an empty array. It is however still possible to use the empty array, so my change is backwards compatible.

Let me know what you think and we'll merge it

@nikolas
Copy link
Copy Markdown
Contributor Author

nikolas commented Aug 30, 2022

Looks good, thank you.

@tvdijen tvdijen merged commit 820c8bf into simplesamlphp:master Aug 30, 2022
tvdijen added a commit that referenced this pull request Aug 30, 2022
Check if $ldapConfig['servers'] is set before using it
tvdijen added a commit that referenced this pull request Aug 30, 2022
Check if $ldapConfig['servers'] is set before using it
@tvdijen
Copy link
Copy Markdown
Member

tvdijen commented Aug 30, 2022

Tagged v0.9.3

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants