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

format_string doesn't use filter in static cache key

XMLWordPrintable

      The format_string function in lib/weblib.php caches the strings in a static variable however the key it generates for the cache doesn't include the 'filter' option which means that a request to format a string with filters won't actually apply the filters if format_string has already been called on that string without filters.

      E.g.
      format_string('some string', true, ['context' => 1, 'filter' => false]);
      and
      format_string('some string', true, ['context' => 1, 'filter' => true]);
      produce the same result, even though the second call requests that the filters apply.

            ryanwyllie Ryan Wyllie
            ryanwyllie Ryan Wyllie
            Luca Bösch Luca Bösch
            David Monllaó David Monllaó
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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