Hi guys, i have this error warning when i enabled the memcache module.
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /drupal7.15/includes/entity.inc).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 356 of /drupal77.15/includes/entity.inc).
in one of the $ids array have this value:
$ids = array(
array(
'uid' => 1
)
)
which array within an array is not compatible with array_flip();
a temporary fixed i made below, which i know is not a good idea, please help out.
$merged_ids = array();
if(!empty($ids)) {
foreach ($ids as $key => $value) {
if(is_array($value)) {
$merged_ids = array_merge($merged_ids, $value);
unset($ids[$key]);
}
}
$ids = array_merge($ids,$merged_ids);
$passed_ids = array_flip($ids);
} else {
$passed_ids = FALSE;
}
Comments
Comment #1
webchickMoving to memcache module.
Comment #2
jeremy commentedUnable to duplicate; please re-open if you're still experiencing a problem with the latest memcache module release.