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
|
@ -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…
Reference in New Issue