From: Tim Düsterhus Date: Tue, 31 May 2022 14:32:58 +0000 (+0200) Subject: Merge branch '5.5' X-Git-Tag: 6.0.0_Alpha_1~1228 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=19d0f155dfa026eecdd008e04dc18f31cc06dc68;p=GitHub%2FWoltLab%2FWCF.git Merge branch '5.5' --- 19d0f155dfa026eecdd008e04dc18f31cc06dc68 diff --cc wcfsetup/install/files/lib/http/middleware/CheckSystemEnvironment.class.php index a88ff17ec0,0000000000..87515c90d3 mode 100644,000000..100644 --- a/wcfsetup/install/files/lib/http/middleware/CheckSystemEnvironment.class.php +++ b/wcfsetup/install/files/lib/http/middleware/CheckSystemEnvironment.class.php @@@ -1,39 -1,0 +1,39 @@@ + + * @package WoltLabSuite\Core\Http\Middleware + * @since 5.6 + */ +final class CheckSystemEnvironment implements MiddlewareInterface +{ + /** + * @inheritDoc + */ + public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface + { + if (!RequestHandler::getInstance()->isACPRequest()) { + if (!(80100 <= \PHP_VERSION_ID && \PHP_VERSION_ID <= 80199)) { + \header('HTTP/1.1 500 Internal Server Error'); - ++ + throw new NamedUserException(WCF::getLanguage()->get('wcf.global.incompatiblePhpVersion')); + } + } + + return $handler->handle($request); + } +}