Skip to content

Commit

Permalink
Fix PHP8.1 deprecated function parameter is null
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisjacquet committed Jun 3, 2022
1 parent adc5dfe commit 25eb319
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/Grades/includes/ReportCards.fnc.php
Expand Up @@ -1551,7 +1551,8 @@ function _getReportCardCommentPersonalizations( $student_id )

if ( $gender_field_type === 'select' )
{
if ( mb_substr( $student_RET[1]['GENDER'], 0, 1 ) === 'F' )
if ( ! empty( $student_RET[1]['GENDER'] )
&& mb_substr( $student_RET[1]['GENDER'], 0, 1 ) === 'F' )
{
$gender = 'F';
}
Expand Down

0 comments on commit 25eb319

Please sign in to comment.