Skip to content

Commit

Permalink
Fix PHP warning undefined array key
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisjacquet committed Oct 11, 2023
1 parent a5023ce commit 3c3a940
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/Grades/ReportCardComments.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
AND GRADE_SCALE_ID IS NOT NULL)>0
ORDER BY SORT_ORDER IS NULL,SORT_ORDER,TITLE", [], [ 'SUBJECT_ID' ] );

if ( ! $_REQUEST['subject_id'] || ! $subjects_RET[$_REQUEST['subject_id']] )
if ( ! $_REQUEST['subject_id'] || empty( $subjects_RET[$_REQUEST['subject_id']] ) )
{
$_REQUEST['subject_id'] = key( $subjects_RET ) . '';
}
Expand All @@ -148,7 +148,7 @@
AND GRADE_SCALE_ID IS NOT NULL)>0
ORDER BY TITLE", [], [ 'COURSE_ID' ] );

if ( ! $_REQUEST['course_id'] || ! $courses_RET[$_REQUEST['course_id']] )
if ( ! $_REQUEST['course_id'] || empty( $courses_RET[$_REQUEST['course_id']] ) )
{
$_REQUEST['course_id'] = key( $courses_RET ) . '';
}
Expand Down

0 comments on commit 3c3a940

Please sign in to comment.