summaryrefslogtreecommitdiffstats
path: root/apps/settings
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2022-07-13 20:19:40 +0200
committerGitHub <noreply@github.com>2022-07-13 20:19:40 +0200
commit9dbcf0560fa2719ceb507e1b3a2bf6074167f8c6 (patch)
tree6623cd924690451c139d962efbe01cf87d952ae8 /apps/settings
parentd7bd6f0e2ac1bd599ddf9a058cef0f7032138016 (diff)
parentcf9b1082ed4550d3ece15d1c2cc613a0a5e008bc (diff)
downloadnextcloud-server-9dbcf0560fa2719ceb507e1b3a2bf6074167f8c6.tar.gz
nextcloud-server-9dbcf0560fa2719ceb507e1b3a2bf6074167f8c6.zip
Merge pull request #33200 from nextcloud/enh/noid/64bit
add a setup check for 64 bit
Diffstat (limited to 'apps/settings')
-rw-r--r--apps/settings/lib/Controller/CheckSetupController.php9
-rw-r--r--apps/settings/tests/Controller/CheckSetupControllerTest.php7
2 files changed, 16 insertions, 0 deletions
diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php
index 51027c5ad1c..8f469c6c4e9 100644
--- a/apps/settings/lib/Controller/CheckSetupController.php
+++ b/apps/settings/lib/Controller/CheckSetupController.php
@@ -747,6 +747,14 @@ Raw output
return true;
}
+ protected function is64bit(): bool {
+ if (PHP_INT_SIZE < 8) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
protected function isMysqlUsedWithoutUTF8MB4(): bool {
return ($this->config->getSystemValue('dbtype', 'sqlite') === 'mysql') && ($this->config->getSystemValue('mysql.utf8mb4', false) === false);
}
@@ -880,6 +888,7 @@ Raw output
'appDirsWithDifferentOwner' => $this->getAppDirsWithDifferentOwner(),
'isImagickEnabled' => $this->isImagickEnabled(),
'areWebauthnExtensionsEnabled' => $this->areWebauthnExtensionsEnabled(),
+ 'is64bit' => $this->is64bit(),
'recommendedPHPModules' => $this->hasRecommendedPHPModules(),
'pendingBigIntConversionColumns' => $this->hasBigIntConversionPendingColumns(),
'isMysqlUsedWithoutUTF8MB4' => $this->isMysqlUsedWithoutUTF8MB4(),
diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php
index 8c9b2f216af..c109bad04ff 100644
--- a/apps/settings/tests/Controller/CheckSetupControllerTest.php
+++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php
@@ -199,6 +199,7 @@ class CheckSetupControllerTest extends TestCase {
'getAppDirsWithDifferentOwner',
'isImagickEnabled',
'areWebauthnExtensionsEnabled',
+ 'is64bit',
'hasRecommendedPHPModules',
'hasBigIntConversionPendingColumns',
'isMysqlUsedWithoutUTF8MB4',
@@ -538,6 +539,11 @@ class CheckSetupControllerTest extends TestCase {
$this->checkSetupController
->expects($this->once())
+ ->method('is64bit')
+ ->willReturn(false);
+
+ $this->checkSetupController
+ ->expects($this->once())
->method('hasRecommendedPHPModules')
->willReturn([]);
@@ -632,6 +638,7 @@ class CheckSetupControllerTest extends TestCase {
'appDirsWithDifferentOwner' => [],
'isImagickEnabled' => false,
'areWebauthnExtensionsEnabled' => false,
+ 'is64bit' => false,
'recommendedPHPModules' => [],
'pendingBigIntConversionColumns' => [],
'isMysqlUsedWithoutUTF8MB4' => false,