
-----------------------------------
Amailer
Sun Sep 25, 2005 3:45 pm

Fate Error:  Only variables can be passed by reference
-----------------------------------
Fatal error: Only variables can be passed by reference in C:\wwwroot\hosted\aov\modules\clan\module_clan.php on line 295

I just upgraded my PHP to 5.0.5 and now I started getting this on my phpBB boards and etc... 

It seems that I cannot like..trim a variable when feeding it to a function.. (example)

submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), $message, str_replace("\'", "''", $poll_title), $poll_options, $poll_length);

			$message = str_replace("\'", "''",addslashes($message));
			$poll_title = str_replace("\'", "''", $poll_title);
			$username = str_replace("\'", "''", $username);
			$subject = str_replace("\'", "''", $subject);

            submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, $username, $subject, $message, $poll_title, $poll_options, $poll_length);

o.O why..... is this happning????
Why isn't it allowed anymore.... is there a way aroudn this?

-----------------------------------
beard0
Sun Sep 25, 2005 11:51 pm


-----------------------------------
Can you post the submit_post() function?  That may lead to some sort of explanation.  Right now I'm wondering about modified parameters, and if 5.0.5 is doing something weird with them, which is making you uncontiously define your parameters as such.

-----------------------------------
wtd
Mon Sep 26, 2005 11:04 am


-----------------------------------
It's expecting arguments to be passed by reference, possibly to avoid copying large amounts of data.  Only variables can be passed by reference, and not simple values.

I'm afraid there's no way around this one.

-----------------------------------
Amailer
Mon Sep 26, 2005 6:07 pm


-----------------------------------
Ah wow thats just great :? phpBB did that in a ton of places... gatta go change it now.

Thanks.
