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

Details

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

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Clockify

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