Skip to content

Commit

Permalink
Fix PHP warning undefined array key "PROFILE_ID"
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisjacquet committed Nov 27, 2024
1 parent 74a88cd commit 2a41260
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Changes in 12.0.1
- Remove "-main" suffix from manually uploaded add-ons in Modules.inc.php & Plugins.inc.php
- Fix PHP error when Recreate Calendar & From or To date is N/A in Calendar.php
- Add checkout latest release tag to installation instrcutions in INSTALL.md, INSTALL_es.md & INSTALL_fr.md
- Fix PHP warning undefined array key "PROFILE_ID" in GetTeacher.fnc.php

Changes in 12.0
---------------
Expand Down
2 changes: 1 addition & 1 deletion functions/GetTeacher.fnc.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function GetTeacher( $teacher_id, $column = 'FULL_NAME', $schools = true )
// Smart cache: do not get ALL users database twice if Teacher not found.
// Note: SQL request has no profile & school year WHERE clause.
$teacher = DBGet( "SELECT STAFF_ID,TITLE,FIRST_NAME,LAST_NAME,MIDDLE_NAME,
" . DisplayNameSQL() . " AS FULL_NAME,USERNAME,PROFILE
" . DisplayNameSQL() . " AS FULL_NAME,USERNAME,PROFILE,PROFILE_ID
FROM staff
WHERE STAFF_ID='" . (int) $teacher_id . "'" . $schools_sql );

Expand Down

0 comments on commit 2a41260

Please sign in to comment.