From b26719d147c035bacf5a772e8c4cdcd18417f255 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Sun, 15 Sep 2024 22:35:13 +0200 Subject: [PATCH] PHP 8.1 EOL Signed-off-by: Daniel Hansson --- nextcloud_update.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/nextcloud_update.sh b/nextcloud_update.sh index 98ef76a99d..0e709a1b57 100644 --- a/nextcloud_update.sh +++ b/nextcloud_update.sh @@ -977,6 +977,21 @@ If you need support, please visit https://shop.hanssonit.se/product/upgrade-php- fi fi +# Check if PHP version is compatible with $NCVERSION +# https://github.com/nextcloud/server/issues/29258 +PHP_VER=81 +NC_VER=32 +if [ "${NCVERSION%%.*}" -ge "$NC_VER" ] +then + if [ "$(php -v | head -n 1 | cut -d " " -f 2 | cut -c 1,3)" -lt "$PHP_VER" ] + then +msg_box "Your PHP version isn't compatible with the new version of Nextcloud. Please upgrade your PHP stack and try again. + +If you need support, please visit https://shop.hanssonit.se/product/upgrade-php-version-including-dependencies/" + exit + fi +fi + # Upgrade Nextcloud if ! site_200 "$NCREPO" then