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

Setting $CFG->svgicons in config.php has no effect

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.9.1
    • 2.8.8, 2.9.2
    • Themes

    Description

      I want to force the use of png-Icons instead of the svg-icons and therefore set $CFG->svgicons to the boolean false in my config.php. This didn't work as expected, as all values of $CFG will be casted to string through the call to "initialise_cfg()" and its call to "get_config('core')" in setup.php, while the method "theme_config::use_svg_icons()" expects $CFG->svgicons to be of boolean type.

      The bug lies in "use_svg_icons()" as the global policy seems to be that every configuration value will be of type string. But it still made me doubt myself for a moment or two when I put a value of one type in and it magically transformed into a value of another type.

      I only checked for version 2.9.1 but I suspect previous versions will also be affected.

      Attachments

        Issue Links

          Activity

            People

              marina Marina Glancy
              r.wiederhold Ralf Wiederhold
              Ankit Agarwal Ankit Agarwal
              David Monllaó David Monllaó
              John Okely John Okely
              Huong Nguyen, Bas Brands, Mathew May, Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/Sep/15