diff --git a/src/RaspAP/Networking/Hotspot/HotspotService.php b/src/RaspAP/Networking/Hotspot/HotspotService.php index e86185eb..e1f7b46f 100644 --- a/src/RaspAP/Networking/Hotspot/HotspotService.php +++ b/src/RaspAP/Networking/Hotspot/HotspotService.php @@ -205,13 +205,13 @@ class HotspotService * * @return array $config */ - public function getHostapdIni() + public function getHostapdIni(): array { $hostapdIni = RASPI_CONFIG . '/hostapd.ini'; if (file_exists($hostapdIni)) { - $config = parse_ini_file($hostapdIni); - return $config; + return parse_ini_file($hostapdIni) ?: []; } + return []; } /**