Commit 52fb58b3 authored by Ad Schellevis's avatar Ad Schellevis

(legacy) crashreport PHP Warning: Illegal string offset 'nentries' in /usr/local/www/diag_....

parent 372fdd7b
......@@ -34,12 +34,13 @@ require_once("interfaces.inc");
$system_logfile = '/var/log/system.log';
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
if (isset($_POST['clear'])) {
clear_log_file($system_logfile);
}
......
......@@ -34,9 +34,10 @@ require_once("interfaces.inc");
$portal_logfile = '/var/log/portalauth.log';
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
$nentries = 50;
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
......
......@@ -35,9 +35,10 @@ require_once("interfaces.inc");
$dhcpd_logfile = '/var/log/dhcpd.log';
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
$nentries = 50;
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
......
......@@ -36,9 +36,10 @@ require_once("interfaces.inc");
$system_logfile = '/var/log/gateways.log';
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
$nentries = 50;
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
......
......@@ -55,9 +55,10 @@ function return_clog($logfile, $tail, $withorig = true, $grepfor = "", $grepinve
$ipsec_logfile = '/var/log/ipsec.log';
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
$nentries = 50;
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
......
......@@ -36,9 +36,10 @@ require_once("interfaces.inc");
$ntpd_logfile = '/var/log/ntpd.log';
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
$nentries = 50;
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
......
......@@ -39,9 +39,10 @@ $shortcut_section = "openvpn";
$openvpn_logfile = '/var/log/openvpn.log';
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
$nentries = 50;
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
......
......@@ -34,9 +34,10 @@ require_once("interfaces.inc");
$ppps_logfile = '/var/log/ppps.log';
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
$nentries = 50;
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
......
......@@ -29,9 +29,10 @@ require_once("guiconfig.inc");
$logfile = '/var/log/squid/cache.log';
$max_logentries = $config['syslog']['nentries'];
if (!$max_logentries) {
$max_logentries = 50;
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
......
......@@ -35,9 +35,10 @@ require_once("interfaces.inc");
$relayd_logfile = '/var/log/relayd.log';
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
$nentries = 50;
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
......
......@@ -36,9 +36,10 @@ require_once("interfaces.inc");
$system_logfile = '/var/log/resolver.log';
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
$nentries = 50;
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
......
......@@ -33,9 +33,10 @@ require_once("interfaces.inc");
$routing_logfile = '/var/log/routing.log';
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
$nentries = 50;
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
......
......@@ -33,9 +33,11 @@ require_once("vpn.inc");
require_once("system.inc");
require_once("interfaces.inc");
$nentries = $config['syslog']['nentries'];
if (!$nentries)
$nentries = 50;
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if (htmlspecialchars($_POST['vpntype']))
$vpntype = htmlspecialchars($_POST['vpntype']);
......
......@@ -35,9 +35,10 @@ require_once("interfaces.inc");
$wireless_logfile = '/var/log/wireless.log';
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
$nentries = 50;
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
......
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