MDL-77237 core: Suppress debugging during capabilities cleanup

To prevent the debugging messages from appearing during the upgrade,
I set a flag to hide them.

For the test file, I adjusted the parameters in
the unassign_capability() function, which seemed to be using
the parameter intended for assign_capability().
This commit is contained in:
meirzamoodle
2025-07-15 14:36:26 +07:00
parent ce34e8ff08
commit 07af6ccc73
3 changed files with 46 additions and 13 deletions
+1 -1
View File
@@ -1189,7 +1189,7 @@ enum param: string {
* @return string
*/
protected function clean_param_value_capability(mixed $param): string {
if (get_capability_info($param)) {
if (!empty($param) && get_capability_info($param)) {
return $param;
} else {
return '';