From 1fec8c07e0d47a571a79a32c08a58a28d7530954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 19 May 2022 10:03:21 +0200 Subject: [PATCH 1/5] Allow 8.2 in versioncheck MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/versioncheck.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/versioncheck.php b/lib/versioncheck.php index 7c95b33310244..8869fe9545331 100644 --- a/lib/versioncheck.php +++ b/lib/versioncheck.php @@ -33,10 +33,10 @@ exit(1); } -// Show warning if >= PHP 8.2 is used as Nextcloud is not compatible with >= PHP 8.2 for now -if (PHP_VERSION_ID >= 80200) { +// Show warning if >= PHP 8.3 is used as Nextcloud is not compatible with >= PHP 8.3 for now +if (PHP_VERSION_ID >= 80300) { http_response_code(500); - echo 'This version of Nextcloud is not compatible with PHP>=8.2.
'; + echo 'This version of Nextcloud is not compatible with PHP>=8.3.
'; echo 'You are currently running ' . PHP_VERSION . '.'; exit(1); } From 0925709c622aeadd208b5b72448b3f1e7deb8c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 26 Jan 2023 10:03:33 +0100 Subject: [PATCH 2/5] Add 8.2 to oci tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is the only test suite testing 8.1, so adding 8.2 as well Signed-off-by: Côme Chilliet --- .github/workflows/oci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/oci.yml b/.github/workflows/oci.yml index bdf6da52bed0e..cbe4ac6df391b 100644 --- a/.github/workflows/oci.yml +++ b/.github/workflows/oci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - php-versions: ['8.0', '8.1'] + php-versions: ['8.0', '8.1', '8.2'] services: oracle: From ac5df8e94f1ffdaa16b96c00927830dc607628b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 26 Jan 2023 11:00:46 +0100 Subject: [PATCH 3/5] Catch deprecation warnings in oci tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/oci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/oci.yml b/.github/workflows/oci.yml index cbe4ac6df391b..12bef5b1ed8e1 100644 --- a/.github/workflows/oci.yml +++ b/.github/workflows/oci.yml @@ -36,6 +36,7 @@ jobs: extensions: ctype, curl, dom, fileinfo, gd, imagick, intl, json, mbstring, oci8, openssl, pdo_sqlite, posix, sqlite, xml, zip tools: phpunit:9 coverage: none + ini-file: development env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c27c9fac98784e77e732fa2ad98f78ae752249ba Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 2 Feb 2023 11:32:57 +0100 Subject: [PATCH 4/5] Try fixing Oracle Signed-off-by: Joas Schilling --- lib/private/Files/Cache/Cache.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index ec284282178e9..380e4427e7d69 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -977,7 +977,12 @@ public function getIncomplete() { $path = $result->fetchOne(); $result->closeCursor(); - return $path; + if ($path === false) { + return false; + } + + // Make sure Oracle does not continue with null for empty strings + return (string)$path; } /** From 4bdc5834fa7d13c53c8f64b33646309062490954 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 2 Feb 2023 11:50:29 +0100 Subject: [PATCH 5/5] Make sure name and path are strings Otherwise Oracle returns NULL for empty strings and PHP 8.2 throws on null in string functions like trim() and md5() Signed-off-by: Joas Schilling --- lib/private/Files/Cache/Cache.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index 380e4427e7d69..6440bf05a1dc1 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -186,6 +186,8 @@ public function get($file) { */ public static function cacheEntryFromData($data, IMimeTypeLoader $mimetypeLoader) { //fix types + $data['name'] = (string)$data['name']; + $data['path'] = (string)$data['path']; $data['fileid'] = (int)$data['fileid']; $data['parent'] = (int)$data['parent']; $data['size'] = 0 + $data['size'];