I am getting the following errors in my logs on every cron run & every time I use update.php:
Notice: Undefined variable: keys in DrupalAPCCache->getMultiple() (line 172 of /hosting/somesite/com/htdocs/cms_sandbox/sites/all/modules/apc/drupal_apc_cache.inc).
Warning: array_keys() expects parameter 1 to be array, null given in DrupalAPCCache->getMultiple() (line 172 of /hosting/somesite/com/htdocs/cms_sandbox/sites/all/modules/apc/drupal_apc_cache.inc).I am using the latest 7x.1x-dev version. Any ideas?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | apc-undefined-index-2091647-3.patch | 445 bytes | twistor |
Comments
Comment #0.0
Anonymous (not verified) commentedUpdated issue summary.
Comment #1
Anonymous (not verified) commentedI changed the following to get the notice & warning to go away.
line 172 of drupal_apc_cache.inc was:
Changed to:
The error messages have gone away & cache creation in & deletion from the APC user cache works.
Comment #2
Anonymous (not verified) commentedAdded an isset check to eliminate the persistent error messages.
Comment #3
twistor commentedThe problem is that getMultiple() is being called with an empty array.
There's 2 ways to solve this.
Predefine keys so that it always exists, or return early if the $cids is empty.
I went with the latter.
Comment #5
R.Muilwijk commentedCommitted to dev.
Comment #6
R.Muilwijk commented