Skip to content

Commit

Permalink
Fix performance: avoid silencing PHP error with @, use isset() instead
Browse files Browse the repository at this point in the history
Regression since 11.8 in case of $ind_concat collision
For example: '11' . '3' and '1' . '13'
  • Loading branch information
francoisjacquet committed Sep 1, 2024
1 parent f80dbe1 commit a7cbade
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 @@ -4,6 +4,7 @@
Changes in 11.8.3
-----------------
- Fix SQL error escape course title & save course, not course period title in FinalGrades.inc.php
- Fix performance: avoid silencing PHP error with @, use isset() instead in DBGet.fnc.php

Changes in 11.8.2
-----------------
Expand Down
2 changes: 1 addition & 1 deletion functions/DBGet.fnc.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function DBGet( $QI, $functions = [], $index = [] )
$ind[] = issetVal( $RET[ $col ] );
}

$ind_concat = implode( '', $ind );
$ind_concat = implode( '-', $ind );

$this_ind = isset( $s[ $ind_concat ] ) ? ++$s[ $ind_concat ] : ( $s[ $ind_concat ] = 1 );
}
Expand Down

0 comments on commit a7cbade

Please sign in to comment.