Changeset 8324

Show
Ignore:
Timestamp:
07/13/08 05:16:54 (4 months ago)
Author:
ryan
Message:

Workaround PHP parse_url() bug. Props azaozz. fixes #7288

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/pluggable.php

    r8209 r8324  
    828828        $location = 'http:' . $location; 
    829829 
    830     $lp  = parse_url($location); 
     830    // In php 5 parse_url may fail if the URL query part contains http://, bug #38143 
     831    $test = ( $cut = strpos($location, '?') ) ? substr( $location, 0, $cut ) : $location; 
     832     
     833    $lp  = parse_url($test); 
    831834    $wpp = parse_url(get_option('home')); 
    832835