Skip to content

Commit e4db354

Browse files
[Bugfix:InstructorUI] Fix error in superuser email status page (Submitty#11438)
### Please check if the PR fulfills these requirements: * [ ] Tests for the changes have been added/updated (if possible) * [ ] Documentation has been updated/added if relevant * [ ] Screenshots are attached to Github PR if visual/UI changes were made ### What is the current behavior? Closes Submitty#11430 ``` 12:02:39 02/04/2025 - FATAL ERROR Error (Code: 0) thrown in /usr/local/submitty/site/app/entities/email/EmailEntity.php (Line 95) by: return $this->term; Message: Typed property app\entities\email\EmailEntity::$term must not be accessed before initialization Stack Trace: #0 /usr/local/submitty/site/app/views/email/EmailStatusView.php(41): app\entities\email\EmailEntity->getTerm() Submitty#1 unknown file(unknown line): app\views\email\EmailStatusView->renderStatusPage() Submitty#2 /usr/local/submitty/site/app/libraries/Output.php(251): call_user_func_array() Submitty#3 /usr/local/submitty/site/app/libraries/Output.php(220): app\libraries\Output->renderTemplate() Submitty#4 /usr/local/submitty/site/app/libraries/response/WebResponse.php(43): app\libraries\Output->renderOutput() Submitty#5 /usr/local/submitty/site/public/index.php(160): app\libraries\response\WebResponse->render() USER: submitty-admin URL: https://submitty.cs.rpi.edu//superuser/email_status_page?csrf_token=a73dc648cdff817faba856852b2c75d5&page=1 ``` ### What is the new behavior? ![now](https://github.com/user-attachments/assets/2a80c1aa-3a5c-4650-a91a-45d445cce076) We can see the email status ### Other information? How to Test: login as superuser send an email check email status page
1 parent 5da095d commit e4db354

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

site/app/entities/email/EmailEntity.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ public function getEmailAddress(): string {
9292
}
9393

9494
public function getTerm(): ?string {
95-
return $this->term;
95+
return $this->term ?? null;
9696
}
9797

9898
public function getCourse(): ?string {
99-
return $this->course;
99+
return $this->course ?? null;
100100
}
101101

102102
/**

0 commit comments

Comments
 (0)