in file : /core/includes/file.inc

the following is the changes,

diff --git a/core/includes/file.inc b/core/includes/file.inc
index bde51ee..b9c217b 100644
--- a/core/includes/file.inc
+++ b/core/includes/file.inc
@@ -266,7 +266,6 @@ function file_url_transform_relative($file_url) {
   // Unfortunately, we pretty much have to duplicate Symfony's
   // Request::getHttpHost() method because Request::getPort() may return NULL
   // instead of a port number.
-  $http_host = '';
   $request = \Drupal::request();
   $host = $request->getHost();
   $scheme = $request->getScheme();

Looks, this is unused for me, because the initialization of the variable is not required and it is immediately getting replaced anyway.

CommentFileSizeAuthor
unsused-variable-file-1.patch516 bytesrakesh.gectcr

Comments

rakesh.gectcr created an issue. See original summary.

rakesh.gectcr’s picture

Issue summary: View changes
Issue tags: +rc eligible
cilefen’s picture

Title: Unused variable in file.inc file » Unused variable in file_url_transform_relative()
Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 5777816 and pushed to 8.0.x. Thanks!

  • alexpott committed 5777816 on 8.0.x
    Issue #2603070 by rakesh.gectcr: Unused variable in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.