net/pppoe: PHP 7.1 compat from master

This commit is contained in:
Franco Fichtner 2017-08-04 08:22:11 +02:00
parent f048bee85d
commit 215eae798d
3 changed files with 3 additions and 10 deletions

View file

@ -1,5 +1,6 @@
PLUGIN_NAME= pppoe
PLUGIN_VERSION= 1.7
PLUGIN_REVISION= 1
PLUGIN_DEPENDS= clog mpd5
PLUGIN_COMMENT= PPPoE server based on MPD5
PLUGIN_MAINTAINER= franco@opnsense.org

View file

@ -32,11 +32,7 @@ require_once("filter.inc");
require_once("plugins.inc.d/if_pppoe.inc");
require_once("interfaces.inc");
if (empty($config['pppoes']['pppoe']) || !is_array($config['pppoes']['pppoe'])) {
$config['pppoes'] = array();
$config['pppoes']['pppoe'] = array();
}
$a_pppoes = &$config['pppoes']['pppoe'];
$a_pppoes = &config_read_array('pppoes', 'pppoe');
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (!empty($_POST['apply'])) {

View file

@ -50,11 +50,7 @@ function vpn_pppoe_get_id()
return $vpnid;
}
if (empty($config['pppoes']['pppoe']) || !is_array($config['pppoes']['pppoe'])) {
$config['pppoes'] = array();
$config['pppoes']['pppoe'] = array();
}
$a_pppoes = &$config['pppoes']['pppoe'];
$a_pppoes = &config_read_array('pppoes', 'pppoe');
$copy_fields = array('remoteip', 'localip', 'mode', 'interface', 'n_pppoe_units', 'pppoe_subnet', 'dns1', 'dns2', 'descr', 'pppoeid');