From dd9a0dd788f0323c4b66b75fa59b80db97232dba Mon Sep 17 00:00:00 2001 From: ralf Date: Tue, 6 Dec 2022 10:44:41 +0100 Subject: [PATCH] fix wrong http status code set, when file not found or any other error --- api/thumbnail.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/thumbnail.php b/api/thumbnail.php index d9ac47fb03..607ef57bdf 100644 --- a/api/thumbnail.php +++ b/api/thumbnail.php @@ -32,7 +32,7 @@ $GLOBALS['egw']->session->commit_session(); if (!read_thumbnail(get_srcfile())) { - header('404 Not found'); + http_response_code(404); // Not found } /** @@ -620,4 +620,4 @@ function gdVersion($user_ver = 0) $info = stristr(ob_get_clean(), 'gd version'); if (preg_match('/\d/', $info, $match)) $gd_ver = $match[0]; return $match[0]; -} +} \ No newline at end of file