Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Not a bug
-
Affects Version/s: BACKEND
-
Fix Version/s: None
-
Component/s: Libraries
-
Labels:None
Description
In version 20, function get_sustem_context() in file lib/accesslib.php, a context record is checked if exists and then inserted. However, when concurrent requests insert the same context record, a duplicate key database error will be raised. When handling the error, the function should not just return null. Instead, we could check if the record already exists in the database and return the record. The same problem exists in version 32 when I tested. I searched in the latest version and the problem also exists there.