From 829eaf03410fd4758421a1e8e0e0dd671080a23f Mon Sep 17 00:00:00 2001
From: Frank Naegler <frank.naegler@typo3.org>
Date: Mon, 27 Mar 2017 19:43:50 +0200
Subject: [PATCH] [BUGFIX] Add version check to /install/index.php

This patch adds a missing PHP version check to the /install/index.php file which
exists only for the redirect to the install tool. Because of this missing version check
an installation without PHP 7.0 will fatal with an parsing error.

Resolves: #80496
Releases: master
Change-Id: Iec97021fb18ac7a4cfa0dcf1961675c3d58305ee
Reviewed-on: https://review.typo3.org/52193
Reviewed-by: Thomas Hohn <thomas@hohn.dk>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
---
 typo3/install/index.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/typo3/install/index.php b/typo3/install/index.php
index e0817d8c91fb..ff7422690b16 100644
--- a/typo3/install/index.php
+++ b/typo3/install/index.php
@@ -1,5 +1,10 @@
 <?php
 
+// Exit early if php requirement is not satisfied.
+if (version_compare(PHP_VERSION, '7.0.0', '<')) {
+    die('This version of TYPO3 CMS requires PHP 7.0 or above');
+}
+
 // This is a stub file for redirecting the user to the proper Install Tool URL
 
 call_user_func(function () {
-- 
GitLab