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

Reindex array to remove gaps after applying allowed_domains list #885

Merged
merged 2 commits into from
Jun 7, 2022

Conversation

mobilisedonline
Copy link
Contributor

Fix for #884

Copy link
Member

@colinodell colinodell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

Would you mind also adding a regression test (either to DomainFilteringAdapterTest.php or perhaps an integration test with both adapters) that confirms the fix works as expected? If you're not sure how or don't have the bandwidth I'll gladly add it myself - it might just take a few days for me to find the time.

@mobilisedonline
Copy link
Contributor Author

Thanks for the fix!

Would you mind also adding a regression test (either to DomainFilteringAdapterTest.php or perhaps an integration test with both adapters) that confirms the fix works as expected? If you're not sure how or don't have the bandwidth I'll gladly add it myself - it might just take a few days for me to find the time.

I could see from testing the fix on the site I'm developing that the gaps in the array were removed but I haven't been able to get my head around how to write a test to prove it.

@colinodell
Copy link
Member

colinodell commented Jun 7, 2022 via email

@colinodell colinodell merged commit e42dbdc into thephpleague:2.3 Jun 7, 2022
@colinodell
Copy link
Member

Test added via effe03b. I modified it to use a mock so we could more easily verify the actual array being passed to the decorated instance.

Thanks again for catching and resolving this! I'll release v2.3.3 with this fix momentarily.

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

Successfully merging this pull request may close these issues.

Setting allowed_domains for the embed extension causes an array key error
2 participants