git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
31de5ab
)
thumb: show 404.png for missing requests
author
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 4 Jul 2018 16:56:08 +0000
(18:56 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 7 Jul 2018 11:42:39 +0000
(13:42 +0200)
thumb/index.php
patch
|
blob
|
history
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";