8000 Cache::many with MemcachedStore throws exception because of array_combine · Issue #35324 · laravel/framework · GitHub
[go: up one dir, main page]

Skip to content

Cache::many with MemcachedStore throws exception because of array_combine #35324

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

Closed
8000
WarcraftLogs opened this issue Nov 22, 2020 · 2 comments
Closed

Comments

@WarcraftLogs
Copy link
  • Laravel Version: 8.15.0
  • PHP Version: 7.4.11

Description:

When invoking Cache::many() with an array of keys where only a subset of the keys are hits, an exception is occurring because of an element count mismatch using array_combine.

ErrorException: array_combine(): Both parameters should have an equal number of elements
#75 /vendor/laravel/framework/src/Illuminate/Cache/MemcachedStore.php(92): Illuminate\Foundation\Bootstrap\HandleExceptions::handleError
#74 internal: array_combine
#73 /vendor/laravel/framework/src/Illuminate/Cache/MemcachedStore.php(92): Illuminate\Cache\MemcachedStore::many
#72 /vendor/laravel/framework/src/Illuminate/Cache/Repository.php(125): Illuminate\Cache\Repository::many
#71 /vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(396): Illuminate\Cache\CacheManager::__call
#70 /vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\Support\Facades\Facade::__callStatic

Steps To Reproduce:

Use the Memcached store and invoke Cache::many with a set of keys where some are in the cache and some are not.

@taylorotwell
Copy link
Member

Unable to recreate this:

image

image

@WarcraftLogs
Copy link
Author

I'll dig into it and try to get a better example, since it must be more specific than I thought. It's a real-world exception that I'm hitting though so I know it's there. 👍

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
0