瀏覽代碼

Fix R01-N28: drop dead $changed[] in SettingsController::update

The local accumulator was appended to but never read — per-key audit rows
already cover what changed, and the redirect target is fixed regardless.
Pure dead-code removal, no behaviour change. Suite still 333 / 868.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
chiappa 2 天之前
父節點
當前提交
216c15d5b0
共有 1 個文件被更改,包括 0 次插入3 次删除
  1. 0 3
      src/Controllers/SettingsController.php

+ 0 - 3
src/Controllers/SettingsController.php

@@ -92,8 +92,6 @@ final class SettingsController
             return Response::text('CSRF token invalid', 403);
         }
 
-        $changed = [];
-
         $this->pdo->beginTransaction();
         try {
             foreach (self::KEYS as $key => [$type]) {
@@ -123,7 +121,6 @@ final class SettingsController
                     ['key' => $key, 'value' => $result['after']],
                     $req, $actor,
                 );
-                $changed[] = $key;
             }
             $this->pdo->commit();
         } catch (Throwable) {