Title: Plugins causing &#8220;rawurlencode() expects parameter 1&#8221; error
Last modified: August 18, 2016

---

# Plugins causing “rawurlencode() expects parameter 1” error

 *  [bravecreatures](https://wordpress.org/support/users/bravecreatures/)
 * (@bravecreatures)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/plugins-causing-rawurlencode-expects-parameter-1-error/)
 * Folks,
 * I hope someone can give me a pointer that might help with this problem. I am 
   using a couple of plug ins on my site and they are both kicking up the same error.
 * The first plugin is WP-Email 2.04 found here [http://www.lesterchan.net/portfolio/programming.php](http://www.lesterchan.net/portfolio/programming.php)
   
   my example is here – [http://www.bravecreatures.com/blog/index.php/2006/reviews/film-reviews/childhood-memories/email/](http://www.bravecreatures.com/blog/index.php/2006/reviews/film-reviews/childhood-memories/email/)
 * The second plugin is Flickr Photo Gallery found here [http://www.tantannoodles.com/toolkit/photo-album/](http://www.tantannoodles.com/toolkit/photo-album/)
   
   my example is here – [http://www.bravecreatures.com/blog/index.php/flickralbums/](http://www.bravecreatures.com/blog/index.php/flickralbums/)
 * Both are causing the following error across the top of the page:
    “Warning: rawurlencode()
   expects parameter 1 to be string, array given in /home/bravecreatures/blog/wp-
   includes/classes.php on line 1651”
 * Looking into the classes.php the line in question is
    `$this->query_string .=
   $wpvar . '=' . rawurlencode($this->query_vars[$wpvar]);`
 * Which is part of the following function
 * `function build_query_string() {
    $this->query_string = '';
 *  foreach ($this->public_query_vars as $wpvar) {
    if (isset($this->query_vars[
   $wpvar]) && '' != $this->query_vars[$wpvar]) { $this->query_string .= (strlen(
   $this->query_string) < 1) ? '' : '&'; $this->query_string .= $wpvar . '=' . rawurlencode(
   $this->query_vars[$wpvar]); } }
 * This is beyond my level of programming skill to unravel, and I have spoken to
   Lester Chan re WP-Email and he is stumped so I hoped someone here might help.
 * Some things I have tried:
 * 1/ I changed the Theme and the problem still showed up in the Default WP theme
   
   2/ I deactivated all the other plugins and the problem still showed up 3/ The
   problem doesnt show up in the default, un themed version of the display pages,
   but once I modify theme to include my theme details (Mallow for reference found
   here – [http://www.somefoolwitha.com/mallow/](http://www.somefoolwitha.com/mallow/))
   the problem occurs
 * the standard includes in the default implimentations (that work) look like this:
 * <?php
    get_header(); ?>
 * The themed version that causes the problem looks like this
 * `<?php // get header ?>`
    `<?php include "header.php"; ?>`
 * `<?php // get get my custom functions ?>`
    `<?php include "myfunctions.php"; ?
   >`
 * I included the extra include, well because I cant tell what the problem is
 * 4/ When I remove the vairious theme includes – sidebar, topbar, footer etc, the
   problem disappears when I remove the include for the header.php
 * To be honest, the pages still work but there is this annoying strip across the
   top, but I would really like to fix it if I can.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [jalmari](https://wordpress.org/support/users/jalmari/)
 * (@jalmari)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/plugins-causing-rawurlencode-expects-parameter-1-error/#post-406520)
 * Hi, I had the same problem but this cleared it all up. Found it in this page:
 * [http://www.cambridgewebworks.com/forum/index.php?PHPSESSID=c9349ba5a69f97890537c5f62e04baca&topic=12.new](http://www.cambridgewebworks.com/forum/index.php?PHPSESSID=c9349ba5a69f97890537c5f62e04baca&topic=12.new)
 * **ENJOY!**
 * _
    We installed the excellent WordPress component for Joomla, but when used together
   with SEF Advance we get an error on the blog page;
 * Warning: rawurlencode() expects parameter 1 to be string, array given in /var/
   www/vhosts/cambridgewebworks.com/httpdocs/components/com_jd-wp/wp-includes/classes.
   php on line 1609
 * In order to fix this you need to do the following;
    • Find the classes.php file
   in the ‘wp-include’ folder • Open it in an HTML editor • Go to line 1609 which
   looks like this;
 * $this->query_string .= $wpvar . ‘=’ .
    rawurlencode($this->query_vars[$wpvar]);
 * • now change it to this;
 * $this->query_string .= $wpvar . ‘=’ .
    rawurlencode($this->query_vars[$wpvar[
   0]]);
 * Now the error shown on the blog page will no longer show. Excellent!
 * `em`
 *  [plognark](https://wordpress.org/support/users/plognark/)
 * (@plognark)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/plugins-causing-rawurlencode-expects-parameter-1-error/#post-406530)
 * Unfortunately this fix will kill the ability to access any static pages or categories
   on the blog…they just default to the main [0] url. another repair is required.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Plugins causing “rawurlencode() expects parameter 1” error’ is closed
to new replies.

 * 2 replies
 * 3 participants
 * Last reply from: [plognark](https://wordpress.org/support/users/plognark/)
 * Last activity: [19 years, 4 months ago](https://wordpress.org/support/topic/plugins-causing-rawurlencode-expects-parameter-1-error/#post-406530)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
