MDL-78545 core_badges: Fix PHP 8.2 dynamic properties

Issue MDL-73325 added the option to tag badges, however
it introduced a dynamic property on the badge object.
In PHP 8.2 dynamic properties are deprecated, this patch
fixes this.
This commit is contained in:
Damian Hippisley 2023-06-23 14:20:20 +01:00 committed by Matt Porritt
parent 1474f74687
commit 26407c6ca1

View File

@ -118,7 +118,6 @@ if ($form->is_cancelled()) {
if ($badge->save()) {
core_tag_tag::set_item_tags('core_badges', 'badge', $badge->id, $context, $data->tags);
$badge->tags = core_tag_tag::get_item_tags_array('core_badges', 'badge', $badge->id);
badges_process_badge_image($badge, $form->save_temp_file('image'));
$form->set_data($badge);
$statusmsg = get_string('changessaved');