diff --git a/src/wp-includes/class-wp-http-curl.php b/src/wp-includes/class-wp-http-curl.php index 27588fba39..3e1d012c4d 100644 --- a/src/wp-includes/class-wp-http-curl.php +++ b/src/wp-includes/class-wp-http-curl.php @@ -179,8 +179,14 @@ class WP_Http_Curl { $this->stream_handle = @fopen( $r['filename'], 'w+' ); else $this->stream_handle = fopen( $r['filename'], 'w+' ); - if ( ! $this->stream_handle ) - return new WP_Error( 'http_request_failed', sprintf( __( 'Could not open handle for fopen() to %s' ), $r['filename'] ) ); + if ( ! $this->stream_handle ) { + return new WP_Error( 'http_request_failed', sprintf( + /* translators: 1: fopen() 2: file name */ + __( 'Could not open handle for %1$s to %2$s.' ), + 'fopen()', + $r['filename'] + ) ); + } } else { $this->stream_handle = false; } diff --git a/src/wp-includes/class-wp-http-streams.php b/src/wp-includes/class-wp-http-streams.php index 49cadbe194..325c509fbf 100644 --- a/src/wp-includes/class-wp-http-streams.php +++ b/src/wp-includes/class-wp-http-streams.php @@ -223,8 +223,14 @@ class WP_Http_Streams { $stream_handle = @fopen( $r['filename'], 'w+' ); else $stream_handle = fopen( $r['filename'], 'w+' ); - if ( ! $stream_handle ) - return new WP_Error( 'http_request_failed', sprintf( __( 'Could not open handle for fopen() to %s' ), $r['filename'] ) ); + if ( ! $stream_handle ) { + return new WP_Error( 'http_request_failed', sprintf( + /* translators: 1: fopen() 2: file name */ + __( 'Could not open handle for %1$s to %2$s.' ), + 'fopen()', + $r['filename'] + ) ); + } $bytes_written = 0; while ( ! feof($handle) && $keep_reading ) {