<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>bbPress support forums Topic: rawurlencode() Error</title>
<link>http://bbpress.org/forums/</link>
<description>bbPress support forums Topic: rawurlencode() Error</description>
<language>en</language>
<pubDate>Tue, 02 Dec 2008 11:21:43 +0000</pubDate>

<item>
<title>Plognark on "rawurlencode() Error"</title>
<link>http://bbpress.org/forums/topic/rawurlencode-error#post-1974</link>
<pubDate>Mon, 04 Dec 2006 08:28:37 +0000</pubDate>
<dc:creator>Plognark</dc:creator>
<guid isPermaLink="false">1974@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Ok, I lied, that actually doesn't fix the problem.&#60;/p&#62;
&#60;p&#62;However, what does seem to work is error supression:&#60;/p&#62;
&#60;p&#62;				$this-&#38;gt;query_string .= $wpvar . '=' . @rawurlencode($this-&#38;gt;query_vars[$wpvar]);&#60;/p&#62;
&#60;p&#62;Just throw an @ sign in front of the offending rawurlencode function and it seems to clean things up.
&#60;/p&#62;</description>
</item>
<item>
<title>Plognark on "rawurlencode() Error"</title>
<link>http://bbpress.org/forums/topic/rawurlencode-error#post-1950</link>
<pubDate>Sun, 03 Dec 2006 21:42:08 +0000</pubDate>
<dc:creator>Plognark</dc:creator>
<guid isPermaLink="false">1950@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Well, I came up with an ugly fix, especially since I don't actually know what I'm doing.&#60;/p&#62;
&#60;p&#62;I've been trying to integrate the BBpress forum right inside my WP theme, which is what I imagine you were trying to do.&#60;/p&#62;
&#60;p&#62;To fix it I added this switch right at the top of my bbpress template header:&#60;/p&#62;
&#60;p&#62;$bbpressswitch = 1;&#60;/p&#62;
&#60;p&#62;unset($_SERVER['PATH_INFO']);&#60;/p&#62;
&#60;p&#62;Then I went into classes.php for wordpress and put an if/else 'switch', basically:&#60;/p&#62;
&#60;p&#62;The first line there is 1645 in my file&#60;/p&#62;
&#60;p&#62;	function build_query_string() {&#60;br /&#62;
		$this-&#38;gt;query_string = '';&#60;/p&#62;
&#60;p&#62;		foreach ($this-&#38;gt;public_query_vars as $wpvar) {&#60;br /&#62;
			if (isset($this-&#38;gt;query_vars[$wpvar]) &#38;#38;&#38;amp; '' != $this-&#38;gt;query_vars[$wpvar]) {&#60;br /&#62;
				$this-&#38;gt;query_string .= (strlen($this-&#38;gt;query_string) &#38;lt; 1) ? '' : '&#38;#38;';&#60;/p&#62;
&#60;p&#62;	// bug fix for BBpress integration&#60;br /&#62;
			if ($bbpressswitch == 1) {&#60;br /&#62;
				// $this-&#38;gt;query_string .= $wpvar . '=' . rawurlencode($this-&#38;gt;query_vars[$wpvar]);&#60;br /&#62;
				// if the url is being accessed from a page outside of WP that is using the header&#60;br /&#62;
				// or other data, turn off this URL encoding.&#60;br /&#62;
			} else {&#60;br /&#62;
				$this-&#38;gt;query_string .= $wpvar . '=' . rawurlencode($this-&#38;gt;query_vars[$wpvar]);&#60;br /&#62;
			}&#60;br /&#62;
	// end of bug fix&#60;br /&#62;
			}&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;It's ugly, and I'm a n00b at this stuff, but it does seem to have cleaned up my error. I guess the bbpress URL's don't work so good when sent through the WP URLencode setup, so turning them off when going into a BBpress page seemed like it might work.&#60;/p&#62;
&#60;p&#62;I don't know if there are any other repurcussions from this change, but again, it turned off the error, and I haven't seen any fallout...yet.&#60;/p&#62;
&#60;p&#62;There are other sites online that seem to offer a fix for the same issue, like this:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://forum.j-prosolution.com/openwp-bugreport/2637-warning-rawurlencode-expects-parameter-1-string.html&#34; rel=&#34;nofollow&#34;&#62;http://forum.j-prosolution.com/openwp-bugreport/2637-warning-rawurlencode-expects-parameter-1-string.html&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;But the fix they suggest kills all of your static pages or category links and always sends you to the main blog page.
&#60;/p&#62;</description>
</item>
<item>
<title>Atsutane on "rawurlencode() Error"</title>
<link>http://bbpress.org/forums/topic/rawurlencode-error#post-554</link>
<pubDate>Thu, 26 Oct 2006 14:17:57 +0000</pubDate>
<dc:creator>Atsutane</dc:creator>
<guid isPermaLink="false">554@http://bbpress.org/forums/</guid>
<description>&#60;blockquote&#62;&#60;p&#62;PHP Warning:  rawurlencode() expects parameter 1 to be string, array given in /home/spider/public_html/wp/wp-includes/classes.php on line 1658&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Well i have that problem when i integrate my bbpress with wordpress. It only happen when i view &#34;manage-&#38;gt;post&#34; and &#34;manage-&#38;gt;pages&#34;. I already edit the classes.php and it only fix my &#34;manage-&#38;gt;post&#34;. My &#34;manage-&#38;gt;pages&#34; are still broken.&#60;/p&#62;
&#60;p&#62;If i disable the integration, everything work perfectly without any error. Anyone know how to fix this thing?
&#60;/p&#62;</description>
</item>

</channel>
</rss>
