Changeset 47617
- Timestamp:
- 04/24/2020 07:26:57 AM (4 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/canonical.php
r47550 r47617 68 68 } 69 69 70 $original = @parse_url( $requested_url );70 $original = parse_url( $requested_url ); 71 71 if ( false === $original ) { 72 72 return; … … 408 408 if ( $redirect_url && ! empty( $redirect['query'] ) ) { 409 409 parse_str( $redirect['query'], $_parsed_query ); 410 $redirect = @parse_url( $redirect_url );410 $redirect = parse_url( $redirect_url ); 411 411 412 412 if ( ! empty( $_parsed_query['name'] ) && ! empty( $redirect['query'] ) ) { … … 426 426 427 427 if ( $redirect_url ) { 428 $redirect = @parse_url( $redirect_url );428 $redirect = parse_url( $redirect_url ); 429 429 } 430 430 431 431 // www.example.com vs. example.com 432 $user_home = @parse_url( home_url() );432 $user_home = parse_url( home_url() ); 433 433 if ( ! empty( $user_home['host'] ) ) { 434 434 $redirect['host'] = $user_home['host']; … … 638 638 */ 639 639 function _remove_qs_args_if_not_in_url( $query_string, array $args_to_check, $url ) { 640 $parsed_url = @parse_url( $url );640 $parsed_url = parse_url( $url ); 641 641 if ( ! empty( $parsed_url['query'] ) ) { 642 642 parse_str( $parsed_url['query'], $parsed_query ); … … 661 661 */ 662 662 function strip_fragment_from_url( $url ) { 663 $parsed_url = @parse_url( $url );663 $parsed_url = parse_url( $url ); 664 664 if ( ! empty( $parsed_url['host'] ) ) { 665 665 // This mirrors code in redirect_canonical(). It does not handle every case. -
trunk/src/wp-includes/class-http.php
r47557 r47617 270 270 } 271 271 272 $arrURL = @parse_url( $url );272 $arrURL = parse_url( $url ); 273 273 274 274 if ( empty( $url ) || empty( $arrURL['scheme'] ) ) { -
trunk/src/wp-includes/class-wp-http-cookie.php
r47557 r47617 94 94 public function __construct( $data, $requested_url = '' ) { 95 95 if ( $requested_url ) { 96 $arrURL = @parse_url( $requested_url );96 $arrURL = parse_url( $requested_url ); 97 97 } 98 98 if ( isset( $arrURL['host'] ) ) { -
trunk/src/wp-includes/class-wp-http-proxy.php
r47508 r47617 168 168 */ 169 169 public function send_through_proxy( $uri ) { 170 /* 171 * parse_url() only handles http, https type URLs, and will emit E_WARNING on failure. 172 * This will be displayed on sites, which is not reasonable. 173 */ 174 $check = @parse_url( $uri ); 170 $check = parse_url( $uri ); 175 171 176 172 // Malformed URL, can not process, but this could mean ssl, so let through anyway. -
trunk/src/wp-includes/comment.php
r47611 r47617 581 581 */ 582 582 $comment_cookie_lifetime = time() + apply_filters( 'comment_cookie_lifetime', 30000000 ); 583 $secure = ( 'https' === parse_url( home_url(), PHP_URL_SCHEME ) ); 583 584 $secure = ( 'https' === parse_url( home_url(), PHP_URL_SCHEME ) ); 585 584 586 setcookie( 'comment_author_' . COOKIEHASH, $comment->comment_author, $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN, $secure ); 585 587 setcookie( 'comment_author_email_' . COOKIEHASH, $comment->comment_author_email, $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN, $secure ); … … 2853 2855 // If we haven't pung it already and it isn't a link to itself. 2854 2856 if ( ! in_array( $link_test, $pung, true ) && ( url_to_postid( $link_test ) != $post->ID ) 2855 // Also, let's never ping local attachments. 2856 && ! is_local_attachment( $link_test ) ) { 2857 $test = @parse_url( $link_test ); 2857 // Also, let's never ping local attachments. 2858 && ! is_local_attachment( $link_test ) 2859 ) { 2860 $test = parse_url( $link_test ); 2858 2861 if ( $test ) { 2859 2862 if ( isset( $test['query'] ) ) { -
trunk/src/wp-includes/feed.php
r47397 r47617 623 623 */ 624 624 function get_self_link() { 625 $host = @parse_url( home_url() );625 $host = parse_url( home_url() ); 626 626 return set_url_scheme( 'http://' . $host['host'] . wp_unslash( $_SERVER['REQUEST_URI'] ) ); 627 627 } -
trunk/src/wp-includes/functions.php
r47550 r47617 867 867 // If we haven't pung it already. 868 868 if ( ! in_array( $link_test, $pung, true ) ) { 869 $test = @parse_url( $link_test );869 $test = parse_url( $link_test ); 870 870 if ( false === $test ) { 871 871 continue; … … 902 902 903 903 // Check to see if we can figure out the mime type from the extension. 904 $url_parts = @parse_url( $url );904 $url_parts = parse_url( $url ); 905 905 if ( false !== $url_parts ) { 906 906 $extension = pathinfo( $url_parts['path'], PATHINFO_EXTENSION ); … … 1241 1241 */ 1242 1242 function wp_remote_fopen( $uri ) { 1243 $parsed_url = @parse_url( $uri );1243 $parsed_url = parse_url( $uri ); 1244 1244 1245 1245 if ( ! $parsed_url || ! is_array( $parsed_url ) ) { -
trunk/src/wp-includes/http.php
r47550 r47617 523 523 } 524 524 525 $parsed_url = @parse_url( $url );525 $parsed_url = parse_url( $url ); 526 526 if ( ! $parsed_url || empty( $parsed_url['host'] ) ) { 527 527 return false; … … 536 536 } 537 537 538 $parsed_home = @parse_url( get_option( 'home' ) );538 $parsed_home = parse_url( get_option( 'home' ) ); 539 539 540 540 if ( isset( $parsed_home['host'] ) ) { … … 655 655 * differences as well. 656 656 * 657 * Error suppression is used as prior to PHP 5.3.3, an E_WARNING would be generated658 * when URL parsing failed.659 *660 657 * @since 4.4.0 661 658 * @since 4.7.0 The `$component` parameter was added for parity with PHP's `parse_url()`. … … 685 682 } 686 683 687 $parts = @parse_url( $url );684 $parts = parse_url( $url ); 688 685 689 686 if ( false === $parts ) { -
trunk/src/wp-includes/pluggable.php
r47554 r47617 1424 1424 $test = $cut ? substr( $location, 0, $cut ) : $location; 1425 1425 1426 // @-operator is used to prevent possible warnings in PHP < 5.3.3. 1427 $lp = @parse_url( $test ); 1426 $lp = parse_url( $test ); 1428 1427 1429 1428 // Give up if malformed URL.
Note: See TracChangeset
for help on using the changeset viewer.