Project

General

Profile

« Previous | Next » 

Revision c6c398c6

Added by Jim Pingle over 6 years ago

Fix #9121: Initialize arrays to prevent PHP 7 errors

View differences:

src/usr/local/www/system_certmanager.php
52 52

  
53 53
if (isset($userid)) {
54 54
	$cert_methods["existing"] = gettext("Choose an existing certificate");
55
	if (!is_array($config['system']['user'])) {
56
		$config['system']['user'] = array();
57
	}
55
	init_config_arr(array('system', 'user'));
58 56
	$a_user =& $config['system']['user'];
59 57
}
60 58

  
......
62 60
	$id = $_REQUEST['id'];
63 61
}
64 62

  
65
if (!is_array($config['ca'])) {
66
	$config['ca'] = array();
67
}
68

  
69
$a_ca =& $config['ca'];
70

  
71
if (!is_array($config['cert'])) {
72
	$config['cert'] = array();
73
}
63
init_config_arr(array('ca'));
64
$a_ca = &$config['ca'];
74 65

  
75
$a_cert =& $config['cert'];
66
init_config_arr(array('cert'));
67
$a_cert = &$config['cert'];
76 68

  
77 69
$internal_ca_count = 0;
78 70
foreach ($a_ca as $ca) {

Also available in: Unified diff