Title: [Plugin: Comment Saver] Oops!
Last modified: August 19, 2016

---

# [Plugin: Comment Saver] Oops!

 *  Resolved [oeconomist](https://wordpress.org/support/users/oeconomist/)
 * (@oeconomist)
 * [18 years ago](https://wordpress.org/support/topic/plugin-comment-saver-oops/)
 * Diagnostic:
 * `Warning: parse_url() expects exactly 1 parameter, 2 given in /home/`_userid_`/
   public_html/wp/wp-content/plugins/comment-saver/comment-saver.php on line 23`
 * I’ve not yet walked through the code to find-out what is happening here, but 
   I notice that there is some Javascript in-play. Perhaps the plugin doesn’t degrade
   gracefully when the user doesn’t have Javascript enabled.
 * Other plugins installed on the ‘blog-in-question include YATCP and Edit Comments
   XT. Theme is Connections Reloaded v1.5.
 * BTW, great idea for a plugin!
 * [http://wordpress.org/extend/plugins/comment-saver/](http://wordpress.org/extend/plugins/comment-saver/)

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

 *  Thread Starter [oeconomist](https://wordpress.org/support/users/oeconomist/)
 * (@oeconomist)
 * [18 years ago](https://wordpress.org/support/topic/plugin-comment-saver-oops/#post-774931)
 * Okay, I just tried the plugin on a ‘blog which had the default theme, and viewed
   it with Javascript enabled, and got exactly the save error message (except that
   the userid were different).
 * I still haven’t walked-through the code, but my next thought is that this issue
   relates to the installed version of PHP.
 *  Thread Starter [oeconomist](https://wordpress.org/support/users/oeconomist/)
 * (@oeconomist)
 * [18 years ago](https://wordpress.org/support/topic/plugin-comment-saver-oops/#post-774987)
 * Yep, as per the PHP documentation, an optional second parameter for `parse_url`
   was added beginning with PHP 5.1.2. If one uses a single parameter, then `parse_url`
   returns an associative array, in which the path is an identifiable element.
 * So my suggestion is that you replace the three invocations
 * `$path = parse_url(get_option('home'), PHP_URL_PATH);`
 * with
 *     ```
       $url_bits = parse_url(get_option('home'));
       $path = $url_bits['path'];
       ```
   
 *  [Will Norris](https://wordpress.org/support/users/wnorris/)
 * (@wnorris)
 * [18 years ago](https://wordpress.org/support/topic/plugin-comment-saver-oops/#post-775053)
 * ahh… didn’t realize that was only in php5. I’ve applied your change and tagged
   v1.2. Thanks.

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

The topic ‘[Plugin: Comment Saver] Oops!’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Will Norris](https://wordpress.org/support/users/wnorris/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/plugin-comment-saver-oops/#post-775053)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
