1
0
mirror of https://github.com/moodle/moodle.git synced 2025-05-05 15:57:04 +02:00

MDL-78055 themes: account for undefined extrascsscallback config.

Where a theme didn't define this property, it would raise debugging
deprecation warnings in PHP8.1.
This commit is contained in:
Paul Holden 2023-05-12 15:05:12 +01:00
parent 76fe404dd5
commit b8f3aa4d12
No known key found for this signature in database
GPG Key ID: A81A96D6045F6164

@ -1599,7 +1599,10 @@ class theme_config {
}
$candidates[] = $parent_config->extrascsscallback;
}
$candidates[] = $this->extrascsscallback;
if (isset($this->extrascsscallback)) {
$candidates[] = $this->extrascsscallback;
}
// Calling the functions.
foreach ($candidates as $function) {
@ -1629,7 +1632,10 @@ class theme_config {
}
$candidates[] = $parent_config->prescsscallback;
}
$candidates[] = $this->prescsscallback;
if (isset($this->prescsscallback)) {
$candidates[] = $this->prescsscallback;
}
// Calling the functions.
foreach ($candidates as $function) {