Make WordPress Core

Opened 2 months ago

Last modified 2 months ago

#60565 reviewing enhancement

download_url() returns inaccurate error message on missing URL argument

Reported by: hinnerk's profile hinnerk Owned by: audrasjb's profile audrasjb
Milestone: 6.6 Priority: normal
Severity: trivial Version: 6.4.3
Component: HTTP API Keywords: has-patch
Focuses: Cc:

Description

Expected:

<?php
if ( ! $url ) {
    return new WP_Error( 'http_no_url', __( 'No URL Provided.' ) );
}

Current implementation:

<?php
if ( ! $url ) {
    return new WP_Error( 'http_no_url', __( 'Invalid URL Provided.' ) );
}

see
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/file.php#L1158

Change History (1)

#1 @audrasjb
2 months ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 6.6
  • Owner set to audrasjb
  • Status changed from new to reviewing

Thanks for the ticket and patch,
Self assigning for review.

Note: See TracTickets for help on using tickets.