mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-12-27 07:31:09 +01:00
Merge pull request #1927 from RaspAP/fix/hostapd-ini
Fix: Return expected datatype from getHostapdIni()
This commit is contained in:
@@ -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 [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user