From dd5df7d12181dc83dad00cb7a6e25d8d918769fb Mon Sep 17 00:00:00 2001 From: MDW Date: Thu, 30 Jul 2026 17:05:49 +0200 Subject: [PATCH] Qual: Rename $from as $from_line (filecheck_diff.php) (#39319) # Qual: Rename $from as $from_line (filecheck_diff.php) SqlInjectionPlugin is configured to consider that '$from' is an SQL expression and requires that assignments to it are protected from Sql Injection. Renaming '$from' fixes false positives. --- htdocs/blockedlog/admin/filecheck_diff.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/blockedlog/admin/filecheck_diff.php b/htdocs/blockedlog/admin/filecheck_diff.php index e2ec50419a2..931c3aed68b 100644 --- a/htdocs/blockedlog/admin/filecheck_diff.php +++ b/htdocs/blockedlog/admin/filecheck_diff.php @@ -1,5 +1,6 @@ + * Copyright (C) 2026 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -263,9 +264,9 @@ function filecheckCollapseContext($diff, $context = 3) $keep = array_fill(0, $n, false); for ($i = 0; $i < $n; $i++) { if ($diff[$i][0] !== ' ') { - $from = max(0, $i - $context); - $to = min($n - 1, $i + $context); - for ($k = $from; $k <= $to; $k++) { + $from_line = max(0, $i - $context); + $to_line = min($n - 1, $i + $context); + for ($k = $from_line; $k <= $to_line; $k++) { $keep[$k] = true; } } @@ -385,7 +386,7 @@ llxFooterFragment(); /** * Close the fragment output and stop the script. * - * @return void + * @return never */ function llxFooterFragment() {