Fix use of option RunWithEndFile
This commit is contained in:
parent
6a608349f5
commit
e88cf15c86
@ -121,9 +121,16 @@ if ( isset($opts->file) )
|
||||
}
|
||||
}
|
||||
|
||||
if ( $OptionsRunWithEndFile && !in_array( $extension, $runExtensions) ) {
|
||||
//Get the realname of file IN or exit
|
||||
if ( $OptionsRunWithEndFile ) {
|
||||
if ( in_array( $extension, $runExtensions) ) {
|
||||
$extensionLength = strlen($extension)+1;
|
||||
$filenameIn = substr($filenameIn, 0, strlen($filenameIn) - $extensionLength);
|
||||
$extension = '';
|
||||
} else {
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$lines = file($fluxBasePath . '/' . $filenameIn);
|
||||
$nbLines = count($lines);
|
||||
|
Loading…
Reference in New Issue
Block a user