Commit 7e94b0e8 authored by Franco Fichtner's avatar Franco Fichtner

openvpn: fix a crash report

(cherry picked from commit 593f9b77)
parent 20873dac
......@@ -406,7 +406,7 @@ if ($act!="new" && $act!="edit") {
<select name="ovpn_servers[]" class="selectpicker" multiple="multiple" data-size="5" data-live-search="true">
<?php
foreach (openvpn_get_remote_access_servers() as $ra_server_vpnid => $ra_server):?>
<option value="<?=$ra_server_vpnid;?>" <?=in_array($ra_server_vpnid, $pconfig['ovpn_servers']) ? "selected=\"selected\"": "";?>>
<option value="<?=$ra_server_vpnid;?>" <?= !empty($pconfig['ovpn_servers']) && in_array($ra_server_vpnid, $pconfig['ovpn_servers']) ? 'selected="selected"' : '' ?>>
<?=!empty($ra_server['description']) ? $ra_server['description'] : ""?> ( <?=$ra_server['local_port'];?> / <?=$ra_server['protocol'];?>)
</option>
<?php
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment