system: fix crash report

If configd doesn't respond the JSON is not available, which we really
need a wrapper for doing this fallback all the time and maybe even
with error reporting inside that returned array.
This commit is contained in:
Franco Fichtner 2017-04-30 15:08:26 +02:00
parent 3abd54ae49
commit d79c1acf57

View File

@ -383,6 +383,9 @@ include("head.inc");
<select name="ssl-ciphers[]" class="selectpicker" multiple="multiple" data-live-search="true" title="<?=gettext("System defaults");?>">
<?php
$ciphers = json_decode(configd_run("system ssl ciphers"), true);
if ($ciphers == null) {
$ciphers = array();
}
foreach ($ciphers as $cipher => $cipher_data):?>
<option value="<?=$cipher;?>" <?= !empty($pconfig['ssl-ciphers']) && in_array($cipher, $pconfig['ssl-ciphers']) ? 'selected="selected"' : '' ?>>
<?=!empty($cipher_data['description']) ? $cipher_data['description'] : $cipher;?>