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: ensure exception message in X-Error header
[minimedit.git]
/
thumb
/
index.php
diff --git
a/thumb/index.php
b/thumb/index.php
index 24f46ccb97ab44ea5125c48d63dc18a03283d4bd..27a194ee51584f5840c42eff880207e02e6a42da 100644
(file)
--- a/
thumb/index.php
+++ b/
thumb/index.php
@@
-17,9
+17,9
@@
try {
}
catch (Throwable $e) {
http_response_code($e->getCode() ?: 500);
}
catch (Throwable $e) {
http_response_code($e->getCode() ?: 500);
+ header("X-Error: ".explode("\n", $e->getMessage())[0], FALSE);
$target = '500.png';
if (file_exists($target)) {
$target = '500.png';
if (file_exists($target)) {
- header("X-Error: ".$e->getMessage());
header('Content-type: '.mime_content_type($target));
readfile($target);
exit;
header('Content-type: '.mime_content_type($target));
readfile($target);
exit;