Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow php 8.2 #36375

Merged
merged 5 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/oci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
php-versions: ['8.0', '8.1']
php-versions: ['8.0', '8.1', '8.2']

services:
oracle:
Expand All @@ -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 }}

Expand Down
9 changes: 8 additions & 1 deletion lib/private/Files/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down Expand Up @@ -977,7 +979,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;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions lib/versioncheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br/>';
echo 'This version of Nextcloud is not compatible with PHP>=8.3.<br/>';
echo 'You are currently running ' . PHP_VERSION . '.';
exit(1);
}