Commit c6ff30e4 authored by Franco Fichtner's avatar Franco Fichtner

src: pppoe iteration blues via crash reporter

parent bb55f6c0
...@@ -471,7 +471,7 @@ include("head.inc"); ...@@ -471,7 +471,7 @@ include("head.inc");
} }
/* tack on PPPoE or PPtP servers here */ /* tack on PPPoE or PPtP servers here */
/* pppoe server */ /* pppoe server */
if (is_array($config['pppoes']['pppoe'])) { if (isset($config['pppoes']['pppoe'])) {
foreach($config['pppoes']['pppoe'] as $pppoe) { foreach($config['pppoes']['pppoe'] as $pppoe) {
if ($pppoe['mode'] == "server") { if ($pppoe['mode'] == "server") {
$ifent = "poes". $pppoe['pppoeid']; $ifent = "poes". $pppoe['pppoeid'];
......
...@@ -52,7 +52,7 @@ if ($_POST) { ...@@ -52,7 +52,7 @@ if ($_POST) {
if (!is_numeric($pppoeid)) { if (!is_numeric($pppoeid)) {
continue; continue;
} }
if (is_array($config['pppoes']['pppoe'])) { if (isset($config['pppoes']['pppoe'])) {
foreach ($config['pppoes']['pppoe'] as $pppoe) { foreach ($config['pppoes']['pppoe'] as $pppoe) {
if ($pppoe['pppoeid'] == $pppoeid) { if ($pppoe['pppoeid'] == $pppoeid) {
vpn_pppoe_configure($pppoe); vpn_pppoe_configure($pppoe);
......
...@@ -37,7 +37,8 @@ function vpn_pppoe_get_id() ...@@ -37,7 +37,8 @@ function vpn_pppoe_get_id()
global $config; global $config;
$vpnid = 1; $vpnid = 1;
if (is_array($config['pppoes']['pppoe'])) {
if (isset($config['pppoes']['pppoe'])) {
foreach ($config['pppoes']['pppoe'] as $pppoe) { foreach ($config['pppoes']['pppoe'] as $pppoe) {
if ($vpnid == $pppoe['pppoeid']) { if ($vpnid == $pppoe['pppoeid']) {
$vpnid++; $vpnid++;
......
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