From 22aeaa944bf5e0646b6ec06995a184d64a55ded0 Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Wed, 12 Jan 2022 10:39:29 +0100 Subject: fixed compiler warning + better warning message --- src/snuffleupagus.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c index 53db721..caa6ba3 100644 --- a/src/snuffleupagus.c +++ b/src/snuffleupagus.c @@ -370,11 +370,11 @@ static PHP_INI_MH(OnUpdateConfiguration) { if (SPCFG(show_old_php_warning) && getenv("SP_SKIP_OLD_PHP_CHECK") == NULL) { 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 mainained anymore. Please upgrade as soon as possible."); + 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 mainained 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."); } } return SUCCESS; -- cgit v1.3