Skip to content
Snippets Groups Projects
Commit a3f5f090 authored by Bernd Oliver Suenderhauf's avatar Bernd Oliver Suenderhauf
Browse files

Followup to: Issue #3050128 by Pancho: Fix regression in FillPdfRedirectAction

parent 8931dbd3
No related branches found
No related tags found
No related merge requests found
......@@ -25,10 +25,13 @@ class FillPdfRedirectAction extends FillPdfSaveAction {
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* Redirects user to the generated PDF file, or if saving the file fails,
* to the front page.
*
* @todo Replace file_create_url() by File::createFileUrl() once we're not
* supporting Drupal 8.6 anymore.
*/
public function execute() {
$saved_file = $this->savePdf();
$url = ($saved_file !== FALSE) ? $saved_file->createFileUrl() : Url::fromRoute('<front>')->toString();
$url = ($saved_file !== FALSE) ? file_create_url($saved_file->getFileUri()) : Url::fromRoute('<front>')->toString();
return new RedirectResponse($url);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment