Commit a926064a authored by Micah Webner's avatar Micah Webner
Browse files

Issue #3250152 by micahw156: Fix deprecated file_create_url() use.

parent f19325fd
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -60,8 +60,7 @@ function hfcbase_preprocess_paragraph(array &$variables) {
  }

  if (!empty($variables['paragraph']->field_background_photo)) {
    $uri = $variables['paragraph']->field_background_photo->entity->getFileUri();
    $path = file_create_url($uri);
    $path = $variables['paragraph']->field_background_photo->entity->createFileUrl();
    $inline_style = "background-image: url('{$path}')";
    $variables['attributes']['style'] = $inline_style;
  }