From acb737ef367f61ee0c0d219ea7272abb56e68e34 Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Wed, 5 Jan 2022 20:17:09 +0100 Subject: skip old php check for testing --- Makefile | 2 +- src/snuffleupagus.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b8236fb..78aefe2 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ compile_debug: ## compile a debug build make -C src tests: release ## compile a release build and run the testsuite - TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test + TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 SP_SKIP_OLD_PHP_CHECK=1 make -C src test coverage: ## compile snuffleugpaus, and run the testsuite with coverage cd src; phpize diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c index 3baad1b..1ccc412 100644 --- a/src/snuffleupagus.c +++ b/src/snuffleupagus.c @@ -367,7 +367,7 @@ static PHP_INI_MH(OnUpdateConfiguration) { (SPCFG(disabled_functions) && zend_hash_num_elements(SPCFG(disabled_functions))) || (SPCFG(disabled_functions_ret) && zend_hash_num_elements(SPCFG(disabled_functions_ret))); - if (SPCFG(show_old_php_warning)) { + 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 || -- cgit v1.3