Error on page refresh

adamcraig - May 28, 2007 - 14:49
Project:Browser Support
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:sarvab
Status:active
Description

Hello!

Thanks for this great module! The only issue that I am having is that when I attempt to refresh a page on the site with the module enabled, I get the following error message:

Fatal error: Call to undefined function: user_access() in /home/peaceful/public_html/develop/sites/all/modules/browser_support/browser_support.module on line 155

The ballpark of line 155 in my browser_support.module file reads:

  if (!variable_get('browscap_version', 0) || user_access('access administration pages') || (variable_get('browser_support_allow_view', 0) && $_SESSION['browser_support_force_view'])) {
    return;
  }

I would greatly appreciate any assistance that can be given.

#1

adamcraig - May 28, 2007 - 14:50

Here is the corrected code:

  if (!variable_get('browscap_version', 0) || user_access('access administration pages') || (variable_get('browser_support_allow_view', 0) && $_SESSION['browser_support_force_view'])) {
    return;
  }

#2

sarvab - May 29, 2007 - 01:30
Assigned to:Anonymous» sarvab
Status:active» closed

Thanks for pointing this out. It was a cache problem where it tries to serve the page without loading the user module.

The issue is fixed now and committed. Let me know if you have any other problems with it. It may take a little bit for the zip file to get updated with the fix.

#3

adamcraig - May 29, 2007 - 16:29
Status:closed» active

Thanks for the fix. I now am receiving the following.

Fatal error: Call to undefined function: drupal_set_html_head() in /home/peaceful/public_html/sites/all/modules/browser_support/browser_support.module on line 189

Thanks for your attention to this matter!

 
 

Drupal is a registered trademark of Dries Buytaert.