[wp-trac] [WordPress Trac] #21966: WordPress Bug - PHP Warning Message "Unable to parse URL"

WordPress Trac wp-trac at lists.automattic.com
Sat Sep 22 16:30:47 UTC 2012


#21966: WordPress Bug - PHP Warning Message  "Unable to parse URL"
----------------------------------------+--------------------------
 Reporter:  onetarek                    |       Type:  defect (bug)
   Status:  new                         |   Priority:  normal
Milestone:  Awaiting Review             |  Component:  HTTP
  Version:  3.4.2                       |   Severity:  major
 Keywords:  needs-testing dev-feedback  |
----------------------------------------+--------------------------
 Today I was viewing the error_log. I found thousands thousands  warning
 message like following. [[BR]]


 '''[20-Sep-2012 09:33:46] PHP Warning:
 parse_url(://blogsearch.google.ae/ping/RPC2) [<a href='function.parse-
 url'>function.parse-url</a>]: Unable to parse URL in
 /home/...../public_html/wp-includes/class-http.php on line 120'''[[BR]]


 I found the issue. We have a list of blog directory to ping in this page
 http://example.com/wp-admin/options-writing.php [[BR]]

 rpc.pingomatic.com  [[BR]]
 api.feedster.com/ping  [[BR]]
 http://api.moreover.com/ping [[BR]]
 ........and more...... [[BR]]

 Some of those are not started with http:// [[BR]]
 When a post is published/updated, WP pings those urls and the warning
 message is occurred. Any one can test this problem by adding urls with out
 http:// in your ping list.[[BR]]
 When I added this missing http:// to all urls the problem was solved.
 I opened the core file wp-includes/class-http.php on line 120[[BR]]
 There is a function parse_url($url).[[BR]]
 This function returns the warning message. [[BR]]

 Wordpress should check if the $url contains http:// or not, before
 parsing.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21966>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list