-
Sub-task
-
Resolution: Fixed
-
Minor
-
2.3.1
-
MOODLE_23_STABLE
-
MOODLE_23_STABLE
-
w34_
MDL-34873_m24_tagstrict -
An error message is displayed when you disable tags on site level and add a tags block to a course index page.
Strict Standards: Creating default object from empty value in /var/www/stable/master/moodle/blocks/tags/block_tags.php on line 43
|
This seems to solve the issue...
--- a/blocks/tags/block_tags.php
|
+++ b/blocks/tags/block_tags.php
|
@@ -40,6 +40,7 @@ class block_tags extends block_base {
|
global $CFG, $COURSE, $SITE, $USER, $SCRIPT, $OUTPUT;
|
|
if (empty($CFG->usetags)) {
|
+ $this->content = new stdClass();
|
$this->content->text = '';
|
if ($this->page->user_is_editing()) {
|
$this->content->text = get_string('disabledtags', 'block_tags');
|
Reproduction steps:
- Log in as admin
- Navigate to Settings > Site admin > Development > Debugging
- Set debugging to the highest level
- Navigate to Settings > Site admin > Advanced features
- Disable tags on site level
- Navigate to a course
- Add a tags block to a course index page