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

When enabledevicedetection on and devicedetectregex set, Theme Selector page fails

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.7.2
    • None
    • None
    • 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

              Unassigned Unassigned
              glen.byram Glen Byram
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, 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: