I use the mobile theme. When viewed by Internet Explorer or an iPhone, the following error message is received:
•Notice: Undefined index: HTTP_USER_AGENT in mobile_theme_detect_php() (line 106 of /home/phoebusl/public_html/sites/all/modules/mobile_theme/mobile_theme.module).
•Notice: Undefined index: HTTP_USER_AGENT in mobile_theme_detect_php() (line 112 of /home/phoebusl/public_html/sites/all/modules/mobile_theme/mobile_theme.module).
•Notice: Undefined index: HTTP_USER_AGENT in mobile_theme_detect_php() (line 129 of /home/phoebusl/public_html/sites/all/modules/mobile_theme/mobile_theme.module).
Comment | File | Size | Author |
---|---|---|---|
#4 | HTTP_USER_AGENT-1399068-4.patch | 3.14 KB | guenoz |
Comments
Comment #1
natukI get this error appearing in the logs as well, but I am not sure what client causes it.
Comment #2
guenoz CreditAttribution: guenoz commentedMy website just started to get those errors as well..
Comment #3
trante CreditAttribution: trante commentedI also have this problem.
Comment #4
guenoz CreditAttribution: guenoz commenteda patch to get rid of those errors in the log
Comment #5
tunicSame problem here.
Patch from #4 removes warning, but I wonder if it removes functionality too. Patch checks if $_SERVER['HTTP_USER_AGENT'] is set, and if not no detection is made. If iPhone and IE seems to not send this header, how to detect those device? The patch just ignore them.
I've not tested the code live, just read it.
Anyway I change status to needs review because I'm not sure how detection works.
Comment #6
mchamps CreditAttribution: mchamps commentedHi,
I'm getting the error continuously. Has there been any progress made?
Cheers.
Comment #7
Stephen OllmanErrors is still being reported.
Notice: Undefined index: HTTP_USER_AGENT in mobile_theme_detect_php()
Notice: Undefined index: HTTP_ACCEPT in mobile_theme_detect_php()
Comment #8
bigmonmulgrew CreditAttribution: bigmonmulgrew commented+1
Getting this too. While the patch in 4 is ok to make my logs look cleaner it would be nice to get a solution for if we do not detect the user agent.