Skip to content
Snippets Groups Projects
Commit 6be7fb7e authored by hoangd's avatar hoangd
Browse files

Fix compatibility with D10.3

parent 7dfea627
Branches
Tags 1.3.1
1 merge request!49Fix compatibility with D10.3
Pipeline #207583 failed
...@@ -33,7 +33,7 @@ class ImageStyleDownloadController extends CoreImageStyleDownloadController { ...@@ -33,7 +33,7 @@ class ImageStyleDownloadController extends CoreImageStyleDownloadController {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function deliver(Request $request, $scheme, ImageStyleInterface $image_style) { public function deliver(Request $request, $scheme, ImageStyleInterface $image_style, string $required_derivative_scheme) {
$target = $request->query->get('file'); $target = $request->query->get('file');
$path_info = pathinfo($target); $path_info = pathinfo($target);
// If .avif file, look for image to derive from. // If .avif file, look for image to derive from.
...@@ -43,7 +43,7 @@ class ImageStyleDownloadController extends CoreImageStyleDownloadController { ...@@ -43,7 +43,7 @@ class ImageStyleDownloadController extends CoreImageStyleDownloadController {
if ($source_uri = $this->lookupSourceImage($image_uri)) { if ($source_uri = $this->lookupSourceImage($image_uri)) {
// Replace AVIF or WebP image with source image and call parent:deliver(). // Replace AVIF or WebP image with source image and call parent:deliver().
$request->query->set('file', str_replace($scheme . '://', '', $source_uri)); $request->query->set('file', str_replace($scheme . '://', '', $source_uri));
$source_response = parent::deliver($request, $scheme, $image_style); $source_response = parent::deliver($request, $scheme, $image_style, $required_derivative_scheme);
$derivative_uri = $image_style->buildUri($image_uri); $derivative_uri = $image_style->buildUri($image_uri);
// If parent:deliver() returns BinaryFileResponse, we'll replace // If parent:deliver() returns BinaryFileResponse, we'll replace
...@@ -77,7 +77,7 @@ class ImageStyleDownloadController extends CoreImageStyleDownloadController { ...@@ -77,7 +77,7 @@ class ImageStyleDownloadController extends CoreImageStyleDownloadController {
throw new NotFoundHttpException(); throw new NotFoundHttpException();
} }
else { else {
return parent::deliver($request, $scheme, $image_style); return parent::deliver($request, $scheme, $image_style, $required_derivative_scheme);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment