Skip to content

Conversation

@eiresendez
Copy link
Contributor

@eiresendez eiresendez commented Jan 20, 2026

Issue & Reproduction Steps

When a case is deleted via the API, visiting the case detail route (including cases/{case_number}/files/{file}) triggers an Undefined variable $request error in CasesController::show.

Solution

  • Add a guard in CasesController.php to return 404 when no requests exist for the case.

How to Test

  1. Delete a case via DELETE /cases/{case_number}.
  2. Visit /cases/{case_number} and /cases/{case_number}/files/{file}.
  3. Confirm you get a 404 and no Undefined variable $request error is logged.
  4. Visit an existing case and confirm the detail view still loads normally.

Related Tickets & Packages

@processmaker-sonarqube
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@eiresendez eiresendez merged commit d6d9947 into epic/FOUR-28600 Jan 21, 2026
9 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants