Moodle
  1. Moodle
  2. MDL-41894

Strict warning when viewing a non anonymous response in feedback

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.4.7, 2.5.3
    • Component/s: Feedback
    • Labels:
    • Rank:
      53064
    • Sprint:
      BACKEND Sprint 5

      Description

      Following Strict warning is generated when viewing a non anonymous response in feedback

      Warning: Creating default object from empty value in /var/www/stable/pgmaster/mod/feedback/show_entries.php on line 45 Call Stack: 0.0007 322440 1. {main}() /var/www/stable/pgmaster/mod/feedback/show_entries.php:0 
      

        Issue Links

          Activity

          Hide
          Ankit Agarwal added a comment -

          Hi Andreas,
          I am not sure those lines that I removed are serving any purpose, can you please verify?
          Thanks

          Show
          Ankit Agarwal added a comment - Hi Andreas, I am not sure those lines that I removed are serving any purpose, can you please verify? Thanks
          Hide
          Ankit Agarwal added a comment -

          This issue was discovered while working on MDL-40047

          Show
          Ankit Agarwal added a comment - This issue was discovered while working on MDL-40047
          Hide
          Dan Poltawski added a comment -

          Hi Ankit,

          Well.. if we are removing this, should we also remove the $formdata = data_submitted() ??

          Show
          Dan Poltawski added a comment - Hi Ankit, Well.. if we are removing this, should we also remove the $formdata = data_submitted() ??
          Hide
          Ankit Agarwal added a comment -

          Thanks Dan, for the review.

          I couldn't find any code that does a post to show_entries.php. Hence I decided to remove

          if (($formdata = data_submitted()) AND !confirm_sesskey()) {
          print_error('invalidsesskey'); 
          } 
          

          from code as well. Pushing for integration. Thanks

          Show
          Ankit Agarwal added a comment - Thanks Dan, for the review. I couldn't find any code that does a post to show_entries.php. Hence I decided to remove if (($formdata = data_submitted()) AND !confirm_sesskey()) { print_error('invalidsesskey'); } from code as well. Pushing for integration. Thanks
          Hide
          Sam Hemelryk added a comment -

          Thanks Ankit this has been integrated now.

          Show
          Sam Hemelryk added a comment - Thanks Ankit this has been integrated now.
          Hide
          David Monllaó added a comment -

          It passes, tested in 24, 25 and master

          Show
          David Monllaó added a comment - It passes, tested in 24, 25 and master
          Hide
          Dan Poltawski added a comment -

          You did it!

          Thanks for your contribution, this change has been merged upstream and is now available on your local git mirror and on download sites shortly.

          Show
          Dan Poltawski added a comment - You did it! Thanks for your contribution, this change has been merged upstream and is now available on your local git mirror and on download sites shortly.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Agile