Skip to content

Commit

Permalink
only support php 8
Browse files Browse the repository at this point in the history
  • Loading branch information
DawoudIO committed May 6, 2023
1 parent 202114b commit 7c1e9de
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

if (version_compare(phpversion(), "7.4.0", "<") || version_compare(phpversion(), "8.0.0", ">=")) {
if (version_compare(phpversion(), "8.0.0", ">=")) {
header("Location: php-error.html");
exit;
}
Expand Down
7 changes: 5 additions & 2 deletions src/php-error.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
<div class="left-section">
<div class="inner-content">
<h1 class="heading">500</h1>
<p class="subheading" style="color: yellow"><b>You are running an incompatible php version.</b></p> <br/>
<p class="subheading">ChurchCRM requires PHP 7.4.x or PHP 8.x</p>
<p class="subheading" style="color: yellow"><b>You are running an incompatible php version.</b></p>
<br/>
<p class="subheading">ChurchCRM requires PHP 8.x. </p>
<p></p>
<p class="subheading"><a href="https://www.php.net/supported-versions.php" style="color: red">Checkout supported versions of PHP</a</p>
</div>
</div>
<div class="right-section">
Expand Down
2 changes: 1 addition & 1 deletion src/setup/routes/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$this->get('', function ($request, $response, $args) {
$renderer = new PhpRenderer('templates/');
$renderPage = 'setup-steps.php';
if (version_compare(phpversion(), "7.4.0", "<") || version_compare(phpversion(), "8.0.0", ">=")) {
if (version_compare(phpversion(), "8.0.0", ">=")) {
$renderPage = 'setup-error.php';
}
return $renderer->render($response, $renderPage, ['sRootPath' => SystemURLs::getRootPath()]);
Expand Down

0 comments on commit 7c1e9de

Please sign in to comment.