Skip to content

Commit 8add9a8

Browse files
committed
Fixed issue in removeLine function of system lib.
1 parent 61f609f commit 8add9a8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

server/lib/classes/system.inc.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,10 +1707,7 @@ function removeLine($filename, $search_pattern, $strict = 0) {
17071707
$out = '';
17081708
foreach($lines as $line) {
17091709
if($strict == 0 && preg_match('/^REGEX:(.*)$/', $search_pattern)) {
1710-
if(preg_match(substr($search_pattern, 6), $line)) {
1711-
$out .= $new_line."\n";
1712-
$found = 1;
1713-
} else {
1710+
if(!preg_match(substr($search_pattern, 6), $line)) {
17141711
$out .= $line;
17151712
}
17161713
} elseif($strict == 0) {

0 commit comments

Comments
 (0)