You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Other non-public schemes may add additional headers and control access to
725
+
// the file.
726
+
if (!$is_public) {
727
+
$headers = file_download_headers($image_uri);
728
+
if (empty($headers)) {
729
+
return MENU_ACCESS_DENIED;
719
730
}
720
-
else {
721
-
$headers = file_download_headers($image_uri);
722
-
if (empty($headers)) {
723
-
return MENU_ACCESS_DENIED;
724
-
}
725
-
if (count($headers)) {
726
-
foreach ($headers as $name => $value) {
727
-
backdrop_add_http_header($name, $value);
728
-
}
731
+
if (count($headers)) {
732
+
foreach ($headers as $name => $value) {
733
+
backdrop_add_http_header($name, $value);
729
734
}
730
735
}
731
736
}
@@ -745,9 +750,12 @@ function image_style_deliver($style, $scheme) {
745
750
}
746
751
747
752
// Confirm that the original source image exists before trying to process it.
748
-
if (!is_file($image_uri)) {
753
+
if (!_image_source_image_exists($image_uri)) {
749
754
watchdog('image', 'Source image at %source_image_path not found while trying to generate derivative image at %derivative_path.', array('%source_image_path' => $image_uri, '%derivative_path' => $derivative_uri));
750
-
return MENU_NOT_FOUND;
755
+
backdrop_add_http_header('Status', '404 Not Found');
0 commit comments