interfaces: appease PHP 8.0

This commit is contained in:
Franco Fichtner 2022-06-08 15:14:57 +02:00
parent 5dd573b6e4
commit ab2cd48c13

View File

@ -1511,7 +1511,7 @@ function interface_wireless_clone($realif, $wlcfg)
$baseif = interface_get_wireless_base($wlcfg['if']);
if (does_interface_exist($realif)) {
exec("/sbin/ifconfig " . escapeshellarg($realif), $output, $ret);
$ifconfig_str = implode($output);
$ifconfig_str = implode(PHP_EOL, $output);
if (($wlcfg_mode == "hostap") && (! preg_match("/hostap/si", $ifconfig_str))) {
log_error("Interface {$realif} changed to hostap mode");
$needs_clone = true;
@ -1955,7 +1955,7 @@ EOD;
* down all wireless networks on the interface.
*/
exec("{$ifconfig} " . escapeshellarg($if), $output);
$ifconfig_str = implode($output);
$ifconfig_str = implode(PHP_EOL, $output);
unset($output);
$reg_changing = false;