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

When enabledevicedetection on and devicedetectregex set, Theme Selector page fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.7.2
    • Fix Version/s: None
    • Labels:
      None
    • Affected Branches:
      MOODLE_27_STABLE

      Description

      If enabledevicedetection is ticked and devicedetectregex has any regular expression in it (and return value can be anything), then the Theme Selector page doesn't list any device or theme, and the following errors are shown:
      Warning: array_keys() expects parameter 1 to be array, object given ___\moodle\lib\classes\useragent.php on line 216
      Warning: array_merge(): Argument #2 is not an array in __\moodle\lib\classes\useragent.php on line 216
      Warning: Invalid argument supplied for foreach() in __\moodle\theme\index.php on line 100
      There are other errors reported on other pages too.

      This seems to be the same as https://moodle.org/mod/forum/discuss.php?d=252721 (re: Moodle 2.6.1)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              glen.byram Glen Byram
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Huong Nguyen, Bas Brands, Mathew May
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: