Title: Maybe bug in php function parse_url?
Last modified: August 18, 2016

---

# Maybe bug in php function parse_url?

 *  [iks](https://wordpress.org/support/users/iks/)
 * (@iks)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/maybe-bug-in-php-function-parse_url/)
 * I try to get rss from my forum. Link to forum rss looks like this:
    [http://my_site/forum/external.php?type=rss2&forumids=62](http://my_site/forum/external.php?type=rss2&forumids=62)(
   by this link there is a forum theme). When I tried to do this, I have an error
   in case, that I see rss of all forum, not for mentioned theme.
 * When I look in code, in file **class-snoopy.php**, I see on line 133, in function‘
   function fetch($URI)’, line
    `$URI_PARTS = parse_url($URI);`
 *  When I look at variable $URI_PARTS, I see this:
 * `Array ( [scheme] => http [host] => my_site [path] => /forum/external.php [query]
   => type=rss2& [fragment] => 038;forumids=62 )`
 * So, I see, that **forumids=62** linked to section ‘fragment’, though I think,
   that **forumids=62** must be linked to section ‘query’. There is a bug.
    I’ll
   edit file class-snoopy.php, function fetch($URI), and after lines
 *     ```
       if (empty($URI_PARTS["path"]))
                $URI_PARTS["path"] = '';
       ```
   
 * add lines
 *     ```
       if (!empty($URI_PARTS['fragment']))
                $URI_PARTS["query"] .= substr($URI_PARTS['fragment'], 4, strlen($URI_PARTS['fragment']));
       ```
   
 * By the manual of php function parse_url, I see this:
 *     ```
       query - after the question mark ?
       fragment - after the hashmark #
       ```
   
 * And I don’t understand, why `?type=rss2&forumids=62` disjointed on query and 
   fragment. Maybe it’s bug? 🙂
 * Sorry for my bad english…
    PS. Уфф, замахался писАть… 🙂

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

 *  [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/maybe-bug-in-php-function-parse_url/#post-622015)
 * and what does that have to do with WP even though it uses snoopy?
 *  Thread Starter [iks](https://wordpress.org/support/users/iks/)
 * (@iks)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/maybe-bug-in-php-function-parse_url/#post-622022)
 * Only that I see rss not for a concrete theme, but for all forum themes…

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

The topic ‘Maybe bug in php function parse_url?’ is closed to new replies.

## Tags

 * [RSS](https://wordpress.org/support/topic-tag/rss/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [iks](https://wordpress.org/support/users/iks/)
 * Last activity: [18 years, 8 months ago](https://wordpress.org/support/topic/maybe-bug-in-php-function-parse_url/#post-622022)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
