catalyst / moodle-auth_saml2

SAML done 100% in Moodle, fast, simple, secure
https://moodle.org/plugins/auth_saml2
70 stars 132 forks source link

Buttons with icons display type does not function #696

Open mlanth opened 2 years ago

mlanth commented 2 years ago

Buttons with icons display type does not function due to Exception.

Exception - Cannot use object of type stdClass as array
line 59 of /auth/saml2/classes/form/selectidp_buttons.php: Error thrown
line 214 of /lib/formslib.php: call to auth_saml2\form\selectidp_buttons->definition()
line 67 of /auth/saml2/selectidp.php: call to moodleform->__construct()

Seems as though this issue has been around since the following commit on June 15, 2021: https://github.com/catalyst/moodle-auth_saml2/commit/2c7d97290022cedb8d4a54dba8e2eb6cbea3a2be

The commit altered the way the metadataentities array was structured and the "selectidp_buttons" class was never updated to reflect the change.

danmarsden commented 2 years ago

thanks for the report - feel free to help by submitting a pull request with a fix.

thanks!