Merge pull request #30030 from nextcloud/fexists

Fix disabled `php_uname`
This commit is contained in:
Vincent Petry 2022-07-26 23:10:12 +02:00 committed by GitHub
commit 9746229558
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,8 +39,8 @@ class HubBundle extends Bundle {
'mail',
];
$architecture = php_uname('m');
if (PHP_OS_FAMILY === 'Linux' && in_array($architecture, ['x86_64', 'aarch64'])) {
$architecture = function_exists('php_uname') ? php_uname('m') : null;
if (isset($architecture) && PHP_OS_FAMILY === 'Linux' && in_array($architecture, ['x86_64', 'aarch64'])) {
$hubApps[] = 'richdocuments';
$hubApps[] = 'richdocumentscode' . ($architecture === 'aarch64' ? '_arm64' : '');
}