Wordpress and PHP 5.3.x: update_comment_type_cache() expected to be a reference

I upgraded a Fedora 11 instance to Fedora 12 and found the following error at the top of one of my Wordpress blogs:

Parameter 1 to update_comment_type_cache() expected to be a reference, 
value given in wp-includes/plugin.php on line 166

The problem wasn't in a plugin, actually. It was within my theme's (R755-light) functions.php:

function update_comment_type_cache(&$queried_posts) {

The temporary fix is to remove the & from that line so it looks like this:

function update_comment_type_cache($queried_posts) {

After clearing out the WP Super Cache, the page was loading properly again. It turns out that the function actually calculates how many comments are available for a given post, so that functionality is working properly right now. A few theme authors are already releasing new versions to fix this bug, but my theme's author has not.

The credit for the fix goes to someone in the Wordpress forums.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Printed from: http://rackerhacker.com/2009/12/21/wordpress-and-php-5-3-x-update_comment_type_cache-expected-to-be-a-reference/ .
© Major Hayden 2010.

4 Comments   »

  • BLoodroSE says:

    yes this is work perfectly
    thanks :D

  • C says:

    My problem is a little different

    Warning: include_once(V:\xampp\htdocs\blog/wp-includes/pomo/mo.php) [function.include-once]: failed to open stream: No such file or directory in V:\xampp\htdocs\blog\wp-settings.php on line 342

    Warning: include_once() [function.include]: Failed opening 'V:\xampp\htdocs\blog/wp-includes/pomo/mo.php' for inclusion (include_path='.;V:\xampp\php\PEAR') in V:\xampp\htdocs\blog\wp-settings.php on line 342

    Warning: require(V:\xampp\htdocs\blog/wp-includes/meta.php) [function.require]: failed to open stream: No such file or directory in V:\xampp\htdocs\blog\wp-settings.php on line 364

  • C says:

    Any ideas ?

  • A Gift says:

    Cool! It's working now. Thank you.

RSS feed for comments on this post , TrackBack URI

Leave a Reply