Skip to content

Commit

Permalink
Update the deprecation checks
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoisin committed Mar 8, 2024
1 parent 697a6c0 commit 9b0cf1b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/snuffleupagus.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,13 +608,12 @@ static PHP_INI_MH(OnUpdateConfiguration) {

if (SPCFG(show_old_php_warning) && getenv("SP_SKIP_OLD_PHP_CHECK") == NULL) {
const time_t ts = time(NULL);
if ((PHP_VERSION_ID < 70300) ||
(PHP_VERSION_ID < 70400 && ts >= (time_t)1638745200L) ||
(PHP_VERSION_ID < 80000 && ts >= (time_t)1669590000L) ||
(PHP_VERSION_ID < 80100 && ts >= (time_t)1700953200L)) {
sp_log_warn("End-of-Life Check", "Your PHP version '" PHP_VERSION "' is not officially maintained anymore. " \
"Please upgrade as soon as possible. - Note: This message can be switched off by setting " \
"'sp.global.show_old_php_warning.disable();' in your rules file or by setting the environment variable SP_SKIP_OLD_PHP_CHECK=1.");
if ((PHP_VERSION_ID < 80100) ||
(PHP_VERSION_ID < 80200 && ts >= (time_t)1732492800L) ||
(PHP_VERSION_ID < 80300 && ts >= (time_t)1765152000L) ||
(PHP_VERSION_ID < 80400 && ts >= (time_t)1795392000L)) {
sp_log_warn("End-of-Life Check", "Your PHP version '" PHP_VERSION "' is not officially maintained anymore, see https://www.php.net/supported-versions.php for details. " \
"Please upgrade as soon as possible.");
}
}
return SUCCESS;
Expand Down

0 comments on commit 9b0cf1b

Please sign in to comment.