Skip to content

fixes #700 for v6: Psr16Adapter::deleteMultiple converts $keys to an array#704

Merged
Geolim4 merged 2 commits into
TruCopilot:v6from
bylexus:fix_issue_700_delete_multiple_in_v6
Sep 4, 2019
Merged

fixes #700 for v6: Psr16Adapter::deleteMultiple converts $keys to an array#704
Geolim4 merged 2 commits into
TruCopilot:v6from
bylexus:fix_issue_700_delete_multiple_in_v6

Conversation

@bylexus
Copy link
Copy Markdown
Contributor

@bylexus bylexus commented Sep 3, 2019

The internal Psr\Cache\CacheItemPoolInterface::deleteItems requires an array as argument. Some popular tools like PhpSpreadsheet use a Traversable instead.
This is the fix for the v6 branch.

Proposed changes

deleteMultiple() should convert the $keys argument to an array, as the underlying CacheItemPoolInterface::deleteItems() method takes arrays only.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)

Agreement

I have read the CONTRIBUTING and CODING GUIDELINE docs

Further comments

This issue also appears in the master branch: I have committed another pull request for the master branch.

…eys to an array.

The internal Psr\Cache\CacheItemPoolInterface::deleteItems requires an array as argument. Some popular tools like PhpSpreadsheet use a Traversable instead.
This is the fix for the v6 branch.
@bylexus bylexus changed the title fixes #700 vor v6: Psr16Adapter::deleteMultiple converts $keys to an array fixes #700 for v6: Psr16Adapter::deleteMultiple converts $keys to an array Sep 3, 2019
@Geolim4
Copy link
Copy Markdown
Member

Geolim4 commented Sep 3, 2019

Why did you re-opened the same PR ?

@Geolim4
Copy link
Copy Markdown
Member

Geolim4 commented Sep 3, 2019

Ahhh my bad.... V6 Sorry !
Thanks you !

… Traversable $keys in an array

The internal array_map function can only be used with native arrays.
@Geolim4 Geolim4 merged commit 93098b0 into TruCopilot:v6 Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants