Notice: Undefined index: HTTP_ACCEPT en is_mobile() (línea 115 de /var/www/www.example.es/htdocs/sites/all/modules/back_to_top/back_to_top.module).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

acke’s picture

Assigned: Unassigned » acke
Status: Active » Needs review
FileSize
522 bytes

Thanks for your report!

I change:

  if (preg_match("/wap\.|\.wap/i", $_SERVER["HTTP_ACCEPT"]))

to:

  if (isset($_SERVER['HTTP_ACCEPT']) and (preg_match("/wap\.|\.wap/i", $_SERVER["HTTP_ACCEPT"])))

Please try the attached patch.

marianoog’s picture

patch tried.
Works fine
Thanks

acke’s picture

Status: Needs review » Fixed

Excellent! It's commited to HEAD and going into the next release. Thank you marianoog for making Back To Top better.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.