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

Type cast var as numerical for calculation in theme_boost

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.9.1
    • Fix Version/s: None
    • Component/s: Themes
    • Affected Branches:
      MOODLE_39_STABLE

      Description

      The following line is throwing a PHP notice during an upgrade:

       $scss .= '$font-size-base: ' . (1 / 100 * $theme->settings->fontsize) . "rem !default;\n";
      

       

      PHP Notice: A non well formed numeric value encountered in /moodle/theme/boost/lib.php on line 154
      

      $theme->settings->fontsize should be typecast as a float before the calculation.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              andrewmadden Andrew Madden
              Participants:
              Component watchers:
              Bas Brands
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: