Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in /sites/all/modules/cache_graceful/cache_graceful.inc on line 50

Trying to track it down but have no luck.. Any idea how I can caught what exactly it complains about?

Comments

gielfeldt’s picture

Hi

Haven't dug into it yet, but from the looks of it, it seems that some code is trying to do a cache_get() using something other than a string or integer as key.

I guess, I could do a check for this in Cache Graceful, but if the above statement is true, then there's some other piece of code thats buggy.

If you can insert the following code between line 48 and 49, then perhaps we can find out where the problem really lies.

foreach ($cids as $cid) {
  if (!is_string($cid) && !is_integer($cid)) {
    print '<pre>';
    debug_print_backtrace();
    die("wrong type");
  }
}

P.S.: above code is from the top of my head and untested, it may be buggy :-)

If the output doesn't make sense, try saving it in a file and post it here and I'll take a look at it.

gielfeldt’s picture

Hi scrypt

Did you find a solution to your problem? I wasn't able to reproduce this other than creating a faulty module like described above.

pavel.karoukin’s picture

Status: Active » Closed (works as designed)

I am sorry for late reply.. This was used shortly on project and since then client moved straight to memcached backend. I tried to activate CacheGraceful again, but it did not produce errors like this anymore, so it is much likely just like you said - a combination of other modules/settings causing that.