May 04

I have not been active visiting my own blog lately and when I opened it today it did not look very good. Actually it was broken with an error message on the top of the page and no posts/articles showing.

Warning: Parameter 1 to fb_update_comment_type_cache() expected to be a reference, value given in /home/breathin/public_html/wp-includes/plugin.php on line 230

php_issue earlier today when I first noticed this issue

Since I had not attended the website for a while I hoped that just doing some updates of WordPress and plugins would fix the problem but it did not. It is the theme I am using that is causing this problem and I am not updating the theme since I have done a lot of changes to it.

It was very easy to fix this and here is what I did (in case you struggle with the same issue).

  1. Open the funtions.php file
  2. Look for the update_comment_type_cache function
  3. Remove the “&” from the function parameter

Old code line

fb_update_comment_type_cache(&$queried_posts) {

New code line

fb_update_comment_type_cache($queried_posts) {

4. Save functions.php with the modified code and reload you WordPress site. It should now be running as normal again. You might need to clear the cache to see it work.

Follow me on twitter @PerOla

Share & enjoy
You can subscribe to my comments feed to keep track of new comments.

2 Comments to “PHP and WordPress: update_comment_type_cache() expected to be a reference”

  1. zengda says:


No Pingbacks to “PHP and WordPress: update_comment_type_cache() expected to be a reference”

Leave a Reply

Subscribe to my comments feed

Subscribe to my feeds Follow me on Twitter