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

print_object loses formatting in certain situations

    XMLWordPrintable

Details

    • MOODLE_403_STABLE

    Description

      Replication steps:
      Go into mod/assign/lib.php and put the following function right at the end:

      function mod_assign_before_footer() {
      echo '<br>';
      echo '<br>';
      $thing = [
      (object) ['id' => 1, 'name' => 'awesome'],
      (object) ['id' => 2, 'name' => 'excellent']
      ];
      print_object($thing);
      throw new coding_exception('hello');
      }
      

      • Now go and visit an assignment activity.

      Expectation: The printed output should be formatted in a way similar to before the changes made to print_object() in MDL-32278
      Result: Content that is not as well formatted.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              abgreeve Adrian Greeve
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:

                Clockify

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