From 33080d973223a1f322f2c1248bc896efe8b59dfc Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Wed, 4 Jul 2018 18:56:08 +0200 Subject: [PATCH] thumb: show 404.png for missing requests --- thumb/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/thumb/index.php b/thumb/index.php index e8b3bcb..f7c36d9 100644 --- a/thumb/index.php +++ b/thumb/index.php @@ -7,7 +7,10 @@ $imgpath = preg_replace('{^(?=[0-9]+/)}', 'data/', $imgpath, 1); if (!file_exists($imgpath)) { http_response_code(404); - exit; + $imgpath = '404.png'; + if (!file_exists($imgpath)) { + exit; + } } $target = "thumb/$height/$imgpath"; -- 2.30.0