View Single Post
Old 12-17-2005, 11:09 PM  
2HousePlague
CURATOR
 
Join Date: Jul 2004
Location: the attic
Posts: 14,572
wordpress issue

WORDPRESS TIP

There are some shitty plug-ins floating around out there right now, and they're breaking blogs. Typical are error strings like this:

?Cannot modify header information - headers already sent by??

and

"Only variables can be passed by reference in..."

To make matters worse, some other people are trying to get you to install a whole nother (certainly questionable) plug-in as a fix. There is absolutely NO NEED. So, I wouldn't. The fix is very simple and takes just 2 minutes:
Quote:
This is a weird one. Today, I added about 40 categories to one of my blogs (http://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..

Source: wordpress.org


2hp
__________________
tada!
2HousePlague is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote