From d0590411c49d256520c55705b1dacebb51958fbe Mon Sep 17 00:00:00 2001 From: PixelTux Date: Sat, 16 Nov 2024 17:15:47 +0100 Subject: [PATCH] gestione null di gas durante la prima installazione --- code/app/Helpers/Permissions.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/app/Helpers/Permissions.php b/code/app/Helpers/Permissions.php index a37639e7..3f9a2c4d 100644 --- a/code/app/Helpers/Permissions.php +++ b/code/app/Helpers/Permissions.php @@ -42,10 +42,13 @@ function allPermissions() */ try { $gas = currentAbsoluteGas(); - $gas = $gas->fresh(); - if ($gas->multigas) { - $ret['App\Gas']['gas.multi'] = _i('Amministrare la modalità Multi-GAS su questa istanza'); + if (isset($gas)) { + $gas = $gas->fresh(); + + if ($gas->multigas) { + $ret['App\Gas']['gas.multi'] = _i('Amministrare la modalità Multi-GAS su questa istanza'); + } } } catch(\Exception $e) {