EduardoKrausME / moodle-theme_degrade

Teme Degrade é um thema com várias opções de topo degrade
2 stars 0 forks source link

Bug: Warning: Undefined property: stdClass::$theme_degrade_customicon in theme/degrade/lib.php on line 490 #14

Closed michael-milette closed 1 month ago

michael-milette commented 1 month ago

I installed the Degrade theme in my instance of Moodle 4.3. During the installation, I accepted the default settings. No settings were customized.

Note: My site has multiple themes. My default theme is Trema.

What is happening

I see the following warning message when I have debugging set to DEVELOPER mode and the setting to display errors is enabled:

Warning: Undefined property: stdClass::$theme_degrade_customicon in theme/degrade/lib.php on line 490

It looks like the theme_degrade_coursemodule_edit_post_actions() function in lib.php is not handling correctly the fact that I didn't upload a file in the customicon Degrade theme setting.

What I expected

This function should not be called in this situation where the theme is installed but not being used to display a page.

Why this needs to be fixed

This is important on Moodle sites where multiple themes are in use.

Let me know if you have any questions.

Best regards,

Michael Milette

eduardokraus commented 1 month ago

https://github.com/EduardoKrausME/moodle-theme_degrade/commit/e6a46d578c44730feddfbab6a51985500e87dd96

michael-milette commented 1 month ago

Thank you!