Revision f31052c7
Added by k-paulius about 10 years ago
etc/inc/interfaces.inc | ||
---|---|---|
4051 | 4051 |
|
4052 | 4052 |
function DHCP6_Config_File_Override($wancfg, $wanif) { |
4053 | 4053 |
|
4054 |
$dhcp6cconf = file_get_contents($wancfg['adv_dhcp6_config_file_override_path']); |
|
4055 |
$dhcp6cconf = DHCP6_Config_File_Substitutions($wancfg, $wanif, $dhcp6cconf); |
|
4054 |
$dhcp6cconf = @file_get_contents($wancfg['adv_dhcp6_config_file_override_path']); |
|
4056 | 4055 |
|
4057 |
return $dhcp6cconf; |
|
4056 |
if ($dhcp6cconf === false) { |
|
4057 |
printf("Error: cannot open {$wancfg['adv_dhcp6_config_file_override_path']} in DHCP6_Config_File_Override() for reading.\n"); |
|
4058 |
return ''; |
|
4059 |
} else { |
|
4060 |
$dhcp6cconf = DHCP6_Config_File_Substitutions($wancfg, $wanif, $dhcp6cconf); |
|
4061 |
return $dhcp6cconf; |
|
4062 |
} |
|
4058 | 4063 |
} |
4059 | 4064 |
|
4060 | 4065 |
|
Also available in: Unified diff
Supress errors when opening custom DHCP6 config file and check if content was successfully retrieved.
Prevents PHP from throwing error in case file does not exist.