mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Create an array if the original is empty
This commit is contained in:
parent
61fb3da06a
commit
9c70418801
@ -174,7 +174,6 @@ if ($_POST) {
|
||||
$etc_ttys = return_filename_as_array("/etc/ttys");
|
||||
$boot_loader_rc = return_filename_as_array("/boot/loader.rc");
|
||||
|
||||
|
||||
conf_mount_rw();
|
||||
|
||||
$fout = fopen("/etc/ttys","w");
|
||||
@ -188,6 +187,8 @@ if ($_POST) {
|
||||
fclose($fout);
|
||||
|
||||
$fout = fopen("/boot/loader.rc","w");
|
||||
if(!is_array($boot_loader_rc))
|
||||
$boot_loader_rc = array();
|
||||
foreach($boot_loader_rc as $blrc) {
|
||||
if(stristr($blrc,"comconsole") <> true) {
|
||||
fwrite($fout, $blrc . "\n");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user