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 |
Jump to:
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
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
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
Thanks for the fix. I now am receiving the following.
Thanks for your attention to this matter!