From d39060e0a8740b9dc871cdddeb1ef10b9b4a9fd5 Mon Sep 17 00:00:00 2001 From: fogelito Date: Sun, 16 Jun 2024 12:49:34 +0300 Subject: [PATCH] getDevice --- app/init.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/init.php b/app/init.php index c201c0b4a3..04836b0ea1 100644 --- a/app/init.php +++ b/app/init.php @@ -1451,9 +1451,9 @@ App::setResource('deviceForBuilds', function ($project) { return getDevice(APP_STORAGE_BUILDS . '/app-' . $project->getId()); }, ['project']); -function getDevice(string $root, ?string $connection = null): Device +function getDevice(string $root, string $connection = ''): Device { - $connection = empty($connection) ? System::getEnv('_APP_CONNECTIONS_STORAGE', '') : System::getEnv($connection, ''); + $connection = !empty($connection) ? $connection : System::getEnv('_APP_CONNECTIONS_STORAGE', ''); if (!empty($connection)) { $acl = 'private';