git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
thumb: show 404.png for missing requests
[minimedit.git]
/
thumb
/
index.php
diff --git
a/thumb/index.php
b/thumb/index.php
index e8b3bcb0e5b18cfc782f6278f08ffb829016e412..f7c36d9d0a6d776bde1a4ff3008b2f401958e770 100644
(file)
--- 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);
if (!file_exists($imgpath)) {
http_response_code(404);
- exit;
+ $imgpath = '404.png';
+ if (!file_exists($imgpath)) {
+ exit;
+ }
}
$target = "thumb/$height/$imgpath";
}
$target = "thumb/$height/$imgpath";