From 3483229199d75cd3809b49a1ba884b77b4a297dc Mon Sep 17 00:00:00 2001 From: SVGAnimate Date: Sat, 24 Jun 2023 16:30:57 +0200 Subject: [PATCH] Fix GH-11522: PHP version check fails with '-' separator Remove php version suffix from '-' separator. Closes GH-11524. --- NEWS | 3 +++ build/php.m4 | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index d86790ce197..d8d6aad24ef 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.1.22 +- Build: + . Fix GH-11522: PHP version check fails with '-' separator. (SVGAnimate) + - CLI: . Fix interrupted CLI output causing the process to exit. (nielsdos) diff --git a/build/php.m4 b/build/php.m4 index 01b82505981..c03aafb715e 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -1892,7 +1892,7 @@ AC_DEFUN([PHP_PROG_PHP],[ if test -n "$PHP"; then AC_MSG_CHECKING([for php version]) - php_version=$($PHP -v | head -n1 | cut -d ' ' -f 2) + php_version=$($PHP -v | head -n1 | cut -d ' ' -f 2 | cut -d '-' -f 1) if test -z "$php_version"; then php_version=0.0.0 fi