-
Bug
-
Resolution: Fixed
-
Critical
-
2.8.8, 2.9
-
MOODLE_28_STABLE, MOODLE_29_STABLE
-
MOODLE_28_STABLE, MOODLE_29_STABLE
-
MDL-51759-master-2 -
In some circumstance when $CFG->svgicons is set to false images will not load.
This turned out to be caused by a confusing situation in theme/image.php:
- where the image is not already cached;
- and the browser did not request svgicons (e.g. svgicons = false);
- then find the first imagefile matching the details, prioritising svgicons
- and cache it
The rationale is that the first time a file is fetched, we must cache all versions of it.
However, if you are not fetching svgicons on that first request, then we wouldn't ordinarily be caching that svg icon, so we must do extra work to cache it.
Unfortunately, that additional cache behaviour was broken, and although it was fetching the first version of the icon, it was not trying to return non-svg icons when there is also an SVG.