{
  "lastUpdate": "2026-04-06",
  "results": {
    "absentReportController.php": {
      "status": "fixed",
      "errors": [
        {"line": 30, "type": "php82", "desc": "$_GET['do'] without null check", "fix": "$_GET['do'] ?? ''"},
        {"line": 32, "type": "php82", "desc": "$_SESSION['erp_lang'] without isset", "fix": "$_SESSION['erp_lang'] ?? 'ar'"},
        {"line": "96-98", "type": "php82", "desc": "$_REQUEST['from/to/chooseEmp'] without null check", "fix": "Added ?? '' for all three"},
        {"line": 106, "type": "old-bug", "desc": "Used $Programsettingdata instead of $Programsetting (wrong variable name) - condition never executed", "fix": "Changed to $Programsetting + added (int) cast"},
        {"line": "-", "type": "db", "desc": "Table employeeattendancesystemweek missing - page crashes with Fatal error", "fix": "Created the missing table with correct columns (id, employeeattendancesystem_id, employee_id, attendancedayen, attendanceTime, departureTime, chosseday)"}
      ],
      "notes": "4 PHP 8.2 fixes + 1 old bug (wrong variable name) + 1 missing DB table. Page tested via curl - HTTP 200, no errors. Link: https://erp8.elbaset.com/erp/controllers/absentReportController.php"
    },
    "clientReportsController.php": {
      "status": "fixed",
      "errors": [
        {"line": 1, "type": "encoding", "desc": "UTF-8 BOM at start of file caused blank white page - output sent before PHP headers", "fix": "Removed BOM bytes"},
        {"line": 107, "type": "php82", "desc": "$_GET['do'] without null check", "fix": "$_GET['do'] ?? ''"},
        {"line": "214-222", "type": "php82", "desc": "$_REQUEST['clientid/find/from/to/order'] without null check", "fix": "Added ?? '' / ?? 0 for all"},
        {"line": 228, "type": "php82", "desc": "$_POST['matchOnly'] without isset check", "fix": "Added ?? 0"},
        {"line": "257,316-397", "type": "php82", "desc": "12 more $_REQUEST accesses without null check in other do actions", "fix": "Added ?? '' / ?? 0 for all"}
      ],
      "notes": "Root cause was UTF-8 BOM causing blank page. 14 PHP 8.2 null-check fixes. Tested via curl - HTTP 200, 270KB page, no errors."
    },
    "accountstree.php": {
      "status": "fixed",
      "errors": [
        {
          "line": 62,
          "type": "php82",
          "desc": "$_GET['do'] without null check - Undefined array key warning in PHP 8.2",
          "fix": "Changed to $_GET['do'] ?? ''"
        },
        {
          "line": "362-365",
          "type": "old-bug-exposed",
          "desc": "$type = new stdClass() replaces original DB object, loses ->id, ->del, ->customName etc. Causes SQL error: WHERE parent = AND del=0",
          "fix": "Removed new stdClass(), just set $type->theValue = $sum directly"
        }
      ],
      "notes": "Bug #2 existed in PHP 5.5 but was hidden (undefined props returned null silently). PHP 8.2 exposed it."
    }
  }
}
