From: Mischa POSLAWSKY Date: Wed, 4 Jul 2018 16:56:08 +0000 (+0200) Subject: thumb: show 404.png for missing requests X-Git-Tag: v3.3~14 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/33080d973223a1f322f2c1248bc896efe8b59dfc thumb: show 404.png for missing requests --- 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";