Commit 3afbc97a authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

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

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