-
Bug
-
Resolution: Fixed
-
Major
-
2.6.2
-
MOODLE_26_STABLE
-
MOODLE_26_STABLE, MOODLE_27_STABLE
-
wip-MDL45846
-
I'm surprised this hasn't come up before. We've just updated the OU servers to 2.6.2, but the issue still occurs on the latest master.
If you have something in the theme settings for devicedetectregex e.g. regular expression (Symbian|MIDP-1.0|Maemo|Windows CE) returns featurephone
when you use the theme/switchdevice.php script, a set of PHP errors are created in the logs:
[04-Jun-2014 00:17:01 Europe/London] PHP Warning: array_keys() expects parameter 1 to be array, object given in /vle/www_root/lib/classes/useragent.php on line 221
[04-Jun-2014 00:17:01 Europe/London] PHP Warning: array_merge(): Argument #2 is not an array in /vle/www_root/lib/classes/useragent.php on line 221
[04-Jun-2014 00:17:01 Europe/London] PHP Warning: in_array() expects parameter 2 to be array, null given in /vle/www_root/lib/classes/useragent.php on line 300
[04-Jun-2014 00:17:01 Europe/London] Default exception handler: Coding error detected, it must be fixed by a programmer: Invalid device type provided to set_user_device_type Debug:
Error code: codingerror
- line 305 of /lib/classes/useragent.php: coding_exception thrown
- line 34 of /theme/switchdevice.php: call to core_useragent::set_user_device_type()
Ultimately then the user sees the "Invalid device type provided to set_user_device_type" error.
- is duplicated by
-
MDL-48027 When enabledevicedetection on and devicedetectregex set, Theme Selector page fails
-
- Closed
-