Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-33294

block_blog_recent and block_blog_tags E_STRICT errors for empty values

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Blocks, Blog, Tags
    • Labels:
    • Testing Instructions:
      Hide
      1. Go to a course
      2. Add the blog menu block
      3. Click to the 'add a blog entry about this course'
      4. Create a blog entry, be sure to give it a tag and save, repeat this 2 times with different titles/tags
      1. Add a the block blog tags to a course page
      2. VERIFY: that no errors are seen
      3. VERIFY: that the two blog tags you entered above are displayed
      4. CHange the settings of the blog tags block to display only 1 tag
      5. VERIFY: that only one blog tag is displayed
      1. Add a the block recent blog entries to a course page
      2. VERIFY: that no errors are seen
      3. VERIFY: that you can see your 2 recent blog entries
      4. Change the block configuration to display only 1 recent blog entry
      5. VERIFY: that only one blog entry is displayed
      Show
      Go to a course Add the blog menu block Click to the 'add a blog entry about this course' Create a blog entry, be sure to give it a tag and save, repeat this 2 times with different titles/tags Add a the block blog tags to a course page VERIFY: that no errors are seen VERIFY: that the two blog tags you entered above are displayed CHange the settings of the blog tags block to display only 1 tag VERIFY: that only one blog tag is displayed Add a the block recent blog entries to a course page VERIFY: that no errors are seen VERIFY: that you can see your 2 recent blog entries Change the block configuration to display only 1 recent blog entry VERIFY: that only one blog entry is displayed
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:

      Description

      Just seen when adding a blog_tags block to master:

      Warning: Creating default object from empty value in /home/nicols/git/software/moodle/blocks/blog_tags/block_blog_tags.php on line 97 Call Stack: 0.0008 324256 1. {main}() /home/nicols/git/software/moodle/index.php:0 0.1943 18726712 2. bootstrap_renderer->header() /home/nicols/git/software/moodle/index.php:98 0.1943 18726896 3. bootstrap_renderer->__call() /home/nicols/git/software/moodle/index.php:98 0.1974 18782952 4. call_user_func_array() /home/nicols/git/software/moodle/lib/setuplib.php:1416 0.1974 18783128 5. core_renderer->header() /home/nicols/git/software/moodle/lib/setuplib.php:1416 0.2245 20456712 6. core_renderer->render_page_layout() /home/nicols/git/software/moodle/lib/outputrenderers.php:712 0.2246 20497368 7. include('/home/nicols/git/software/moodle/theme/base/layout/frontpage.php') /home/nicols/git/software/moodle/lib/outputrenderers.php:765 0.6455 41093520 8. block_manager->region_has_content() /home/nicols/git/software/moodle/theme/base/layout/frontpage.php:4 0.6455 41093520 9. block_manager->ensure_content_created() /home/nicols/git/software/moodle/lib/blocklib.php:352 0.6455 41093656 10. block_manager->create_block_contents() /home/nicols/git/software/moodle/lib/blocklib.php:981 0.7052 46060576 11. block_base->get_content_for_output() /home/nicols/git/software/moodle/lib/blocklib.php:929 0.7052 46062376 12. block_base->formatted_contents() /home/nicols/git/software/moodle/blocks/moodleblock.class.php:232 0.7052 46062488 13. block_blog_tags->get_content() /home/nicols/git/software/moodle/blocks/moodleblock.class.php:281

      get_content() sets $this->config->timewithin and other settings, but $this->config is null

      Not sure of the best way of setting initial settings for $this->config in this case.

        Gliffy Diagrams

          Activity

          dobedobedoh Andrew Nicols created issue -
          Hide
          poltawski Dan Poltawski added a comment -

          Thanks for the report. I added all the blocks and saw same problem with recent blog entries.

          Show
          poltawski Dan Poltawski added a comment - Thanks for the report. I added all the blocks and saw same problem with recent blog entries.
          poltawski Dan Poltawski made changes -
          Field Original Value New Value
          Summary $this->config not defined in blocks/blog_tags/block_blog_tags.php block_blog_recent and block_blog_tags E_STRICT errors for empty values
          Fix Version/s STABLE backlog [ 10463 ]
          Testing Instructions # Add a the block blog tags to a course page
          # VERIFY: that no errors are seen
          # Add a the block recent blog entries to a course page
          # VERIFY: that no errors are seen
          Labels triaged
          Assignee moodle.com [ moodle.com ] Dan Poltawski [ poltawski ]
          Affects Version/s 2.3 [ 10657 ]
          Affects Version/s 2.1.6 [ 12052 ]
          poltawski Dan Poltawski made changes -
          Status Open [ 1 ] Waiting for integration review [ 10010 ]
          poltawski Dan Poltawski made changes -
          poltawski Dan Poltawski made changes -
          Testing Instructions # Add a the block blog tags to a course page
          # VERIFY: that no errors are seen
          # Add a the block recent blog entries to a course page
          # VERIFY: that no errors are seen
          # Go to a course
          # Add the blog menu block
          # Click to the 'add a blog entry about this course'
          # Create a blog entry, be sure to give it a tag and save, repeat this 2 times with different titles/tags
          # Add a the block blog tags to a course page
          # VERIFY: that no errors are seen
          # VERIFY: that the two blog tags you entered above are displayed
          # CHange the settings of the blog tags block to display only 1 tag
          # VERIFY: that only one blog tag id displayed
          # Add a the block recent blog entries to a course page
          # VERIFY: that no errors are seen
          # VERIFY: that you can see your 2 recent blog entries
          # Change the block configuration to display only 1 recent blog entry
          # VERIFY: that only one blog entry is displayed
          poltawski Dan Poltawski made changes -
          Testing Instructions # Go to a course
          # Add the blog menu block
          # Click to the 'add a blog entry about this course'
          # Create a blog entry, be sure to give it a tag and save, repeat this 2 times with different titles/tags
          # Add a the block blog tags to a course page
          # VERIFY: that no errors are seen
          # VERIFY: that the two blog tags you entered above are displayed
          # CHange the settings of the blog tags block to display only 1 tag
          # VERIFY: that only one blog tag id displayed
          # Add a the block recent blog entries to a course page
          # VERIFY: that no errors are seen
          # VERIFY: that you can see your 2 recent blog entries
          # Change the block configuration to display only 1 recent blog entry
          # VERIFY: that only one blog entry is displayed
          # Go to a course
          # Add the blog menu block
          # Click to the 'add a blog entry about this course'
          # Create a blog entry, be sure to give it a tag and save, repeat this 2 times with different titles/tags

          # Add a the block blog tags to a course page
          # VERIFY: that no errors are seen
          # VERIFY: that the two blog tags you entered above are displayed
          # CHange the settings of the blog tags block to display only 1 tag
          # VERIFY: that only one blog tag is displayed

          # Add a the block recent blog entries to a course page
          # VERIFY: that no errors are seen
          # VERIFY: that you can see your 2 recent blog entries
          # Change the block configuration to display only 1 recent blog entry
          # VERIFY: that only one blog entry is displayed
          stronk7 Eloy Lafuente (stronk7) made changes -
          Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
          Integrator stronk7
          Currently in integration Yes [ 10041 ]
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks!

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
          stronk7 Eloy Lafuente (stronk7) made changes -
          Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
          Fix Version/s 2.3 [ 10657 ]
          Fix Version/s STABLE backlog [ 10463 ]
          timb Tim Barker made changes -
          Tester timb
          timb Tim Barker made changes -
          Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
          Hide
          timb Tim Barker added a comment -

          Tested as per testing instructions and the fix passed testing.

          Show
          timb Tim Barker added a comment - Tested as per testing instructions and the fix passed testing.
          timb Tim Barker made changes -
          Status Testing in progress [ 10011 ] Tested [ 10006 ]
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          And this has been incorporated to all the weekly builds and also, to Moodle 2.3 Release Candidate 1, yay!

          Many, many thanks for your hard work!

          Ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - And this has been incorporated to all the weekly builds and also, to Moodle 2.3 Release Candidate 1, yay! Many, many thanks for your hard work! Ciao
          stronk7 Eloy Lafuente (stronk7) made changes -
          Status Tested [ 10006 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Currently in integration Yes [ 10041 ]
          Integration date 24/Jun/12
          Subversion JIRA

          Links Hierarchy

           Documentation

          Invalid license: EXPIRED

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                25/Jun/12