This really is not solved!
The problem is not being caused by the Zend optimizer, apache or the PHP whatsoever. It’s simply being caused by functions not taking care of what to supply to the WP_Object_Cache->get() method.
In my case I was just trying to resolve the categories for a given post. Tracking the problem down I found that somehow the function
“update_post_category_cache()” (functions.php:640) caused the trouble.
This one is trying to get the category information for each category found for the post (line 667-668).
It happens under certain circumstances the WP_Object_Cache->get() method is called with an object instead of a string or an integer value as $id to cache.
My fix was to apply a correct check to the WP_Object_Cache->get() method:
--- ../wordpress/wp-includes/cache.php.old 2007-07-04 08:03:39.000000000 +0200
+++ ../wordpress/wp-includes/cache.php 2007-07-04 08:03:06.000000000 +0200
@@ -122,6 +122,10 @@
if (empty ($group))
$group = 'default';
+ if (!is_string($id) || !is_numeric($id)) {
+ return false;
+ }
+
if (isset ($this->cache[$group][$id])) {
if ($count_hits)
$this->warm_cache_hits += 1;
BUT I really think this should be fixed within the calling logic too in order to handle this kind of “caching” correctly.