Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-31167 PHP strict META
  3. MDL-34873

Strict standard error on tags block and when editing tags

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.3.2
    • 2.3.1
    • Blocks, Tags

      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:

      1. Log in as admin
      2. Navigate to Settings > Site admin > Development > Debugging
      3. Set debugging to the highest level
      4. Navigate to Settings > Site admin > Advanced features
      5. Disable tags on site level
      6. Navigate to a course
      7. Add a tags block to a course index page

            skodak Petr Skoda
            ankit_frenz Ankit Agarwal
            Dan Poltawski Dan Poltawski
            Andrew Davis Andrew Davis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.