mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Replace split with explode
`split` was deprecated in PHP 5.3.0 and removed in PHP 7.0.0, `explode` is a drop-in replacement.
This commit is contained in:
parent
54c9563274
commit
7dc76c873f
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ if(isset($argv[1]) && $argv[1] == "config")
|
||||||
// do the magic
|
// do the magic
|
||||||
if(!$limit || ($limit >=5000 ) || $limit <= 0) $limit = 5000;
|
if(!$limit || ($limit >=5000 ) || $limit <= 0) $limit = 5000;
|
||||||
$out = shell_exec("tail -n ".$limit." \"".$logfile."\"");
|
$out = shell_exec("tail -n ".$limit." \"".$logfile."\"");
|
||||||
$fp = split("\n",$out);
|
$fp = explode("\n",$out);
|
||||||
if(!count(@$fp)) {
|
if(!count(@$fp)) {
|
||||||
fwrite(STDOUT, "0\n");
|
fwrite(STDOUT, "0\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue