Needs review
Project:
WURFL
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Oct 2010 at 18:02 UTC
Updated:
21 May 2011 at 03:26 UTC
Jump to comment: Most recent file
I'm not quite sure what causes the following error to appear - something to do with what happens when we mirror our site onto a backup where WURFL is not fully installed.
Fatal error: Call to a member function getDeviceForHttpRequest() on a non-object in /home/kalaam/www.kalaam.org/sites/all/modules/wurfl/wurfl.module on line 102
In order to eliminate both that error and the subsequent error (below) and fail more gracefully, I've added a simple check that the object in question does exist. If it does not, the functions just return nothing.
Fatal error: Call to a member function getCapability() on a non-object in /home/kalaam/www.kalaam.org/sites/all/modules/wurfl/wurfl.module on line 153
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | wurfl.module.941774.patch | 1.09 KB | martin_q |
Comments
Comment #1
martin_qPatch with bug fix attached.
Comment #2
martin_qPatch with bug fix now attached (I hope).
Comment #3
twom commentedThx for the patch. However is WURFL working?
This problem can occur if you enable device detection with WURFL when WURFL is not installed correctly.
I have added a range of checks, but maybe not enough;
Check the following:
- wurfl lib in your libraries folder
- the resource folder has the wurfl.xml and wurfl-config.xml
- cache folder in your wurfl lib folder is writable
Thx,
Tom
Comment #4
martin_qHi,
No, as mentioned in my initial post, this is for situations where WURFL is not correctly installed. My patch is there to help with more graceful degradation.
Thanks,
Martin
Comment #5
vip_sa commentedI just get this error on my localhost so will this patch work or not?
the error:
Call to a member function getDeviceForHttpRequest() on a non-object in C:\wamp\www\mobile\sites\all\modules\wurfl\wurfl.module on line 101
Comment #6
martin_qYou can try it - it's a very similar error, so worth a try. However, this won't fix WURFL for you. All the patch does is stop the WURFL problem from bringing your whole site down.
Comment #7
j4 commentedHi,
Do the resources and cache folders have to be inside the wurfl folder or in thesame level as the wurfl folder? either way i am getting the please create ... message on the admin/settings/wurfl page. Can you help me please?
Thanks
Jaya