Title: PHP Warning:  end() expects parameter 1 to be array
Last modified: August 30, 2016

---

# PHP Warning: end() expects parameter 1 to be array

 *  Resolved [cwendt01](https://wordpress.org/support/users/cwendt01/)
 * (@cwendt01)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/php-warning-end-expects-parameter-1-to-be-array/)
 * I’m currently using the latest version of Simplr User Registration Form Plus (
   2.3.6) with two different, up-to-date WP sites (4.3) and noticed that the sites’
   PHP error logs were getting quite large. Looking inside them, both sites’ logs
   were full of this error message:
 * `PHP Warning: end() expects parameter 1 to be array, string given in /www/mysite/
   public_html/wp-content/plugins/simplr-registration-form/simplr_reg_page.php on
   line 611`
 * I’m not noticing the plugin acting strangely in any way, so I think this is a
   benign issue. Still, I’d prefer the plugin to not be throwing PHP errors, as 
   that’s never a good thing.
 * Thanks!
 * – C.
 * [https://wordpress.org/plugins/simplr-registration-form/](https://wordpress.org/plugins/simplr-registration-form/)

Viewing 1 replies (of 1 total)

 *  [Marcel Pol](https://wordpress.org/support/users/mpol/)
 * (@mpol)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/php-warning-end-expects-parameter-1-to-be-array/#post-6505326)
 * Strange, it is doing an explode() right before that, and afaik explode() returns
   an array. Do you use any special URL or something?
 * If you care to debug, could you change the lines there to this in your testsetup?
 *     ```
       function simplr_register_redirect() {
       	$file = parse_url($_SERVER['REQUEST_URI']);
       echo "file :";
       var_dump($file);
       	$path = explode('/',@$file['path']);
       echo "path :";
       var_dump($path);
       die("Hi");
       ```
   
 * Then request an url:
    [http://domain.com/wp-login.php?action=register](http://domain.com/wp-login.php?action=register)
 * Here I get this output:
 *     ```
       file :
   
       array (size=2)
         'path' => string '/wp-login.php' (length=13)
         'query' => string 'action=register' (length=15)
   
       path :
   
       array (size=2)
         0 => string '' (length=0)
         1 => string 'wp-login.php' (length=12)
   
       Hi
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘PHP Warning: end() expects parameter 1 to be array’ is closed to new 
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simplr-registration-form_be8c38.svg)
 * [Simplr Registration Form Plus+](https://wordpress.org/plugins/simplr-registration-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simplr-registration-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simplr-registration-form/)
 * [Active Topics](https://wordpress.org/support/plugin/simplr-registration-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simplr-registration-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simplr-registration-form/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Marcel Pol](https://wordpress.org/support/users/mpol/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/php-warning-end-expects-parameter-1-to-be-array/#post-6505326)
 * Status: resolved