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

PHPDocs of resolve_image_location are partially inaccurate

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.5, 3.2.2, 3.3
    • Fix Version/s: 3.1.6, 3.2.3
    • Component/s: Themes
    • Labels:

      Description

      During testing of MDL-58485, David Mudrák (@mudrd8mz) correctly pointed out that the phpdocs of the \theme_config::resolve_image_location function (particularly, for the parameter $svg are inaccurate:

      @param bool $svg If set to true SVG images will also be looked for.
      

      However, implementation of that function explicitly handles the case that $svg is null, which results in a fallback to browser support of SVGs. Therefore, docs should be updated to

      @param bool|null $svg Should SVG images be also looked for, null for auto-detection of browser support.
      

      ... I'll prepare a patch.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jan.dagefoerde Jan Dageförde
              Reporter:
              jan.dagefoerde Jan Dageförde
              Peer reviewer:
              Ankit Agarwal
              Integrator:
              Andrew Nicols
              Tester:
              Andrew Nicols
              Participants:
              Component watchers:
              Bas Brands
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/May/17