Only variables can be passed by reference in classes.php
-
This is a weird one. Today, I added about 40 categories to one of my blogs (https://www.dehumanizer.com/wayofthemind/), which only had 2 of them before, and went through all the posts, changing their categories from “General” to the correct ones.
Afterwards, when going to a category page (like /wayofthemind/category/xxx, assuming xxx is a category), I got this in my error logs:
[Tue Aug 23 17:43:40 2005] [error] PHP Fatal error: Only variables can be passed by reference in /var/www/htdocs/wayofthemind/wp-includes/classes.php on line 629
I looked at that file, and after a few tests, found out that changing line 629 from:
$category = &get_category($this->get('cat'));
to something like:
$crom = $this->get('cat');
$category = &get_category($crom);makes the error disappear, and the page is correctly displayed.
When googling for info about this problem, I found about 50 other WordPress blogs displaying the same error: google for
“Only variables can be passed by reference in” “classes.php on line 629”(that’s a single query), so I’m not the only one, at least..
Using WordPress 1.5.2, PHP 5.0.4, no active plugins, no local customizations except adding geotags to the RSS feeds.
- The topic ‘Only variables can be passed by reference in classes.php’ is closed to new replies.