Closed (fixed)
Project:
Authenticated User Page Caching (Authcache)
Version:
7.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Mar 2012 at 22:14 UTC
Updated:
21 Apr 2013 at 18:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
simg commentedI've made quite a few fixes / updates recently, and I don't get this warning.
Am assuming it's fixed ?
Comment #2
DrMiaow commentedI'm assuming this is related to the issue I am getting.
Notice: Undefined offset: 1 in _authcache_is_account_cacheable() (line 168 of sites\all\modules\authcache\authcache.helpers.inc).
test for count($extra_roles) == 1
gurantees that $extra_roles[0] exists, but $extra_roles[1] is being accessed.
So either count($extra_roles) needs to be > 1 or $extra_roles[0] needs to be tested.. or something else.
I resolved this by changing line 168 so that
becomes
Which could be wrong. Can you please verify that solution is correct? Thanks.
Comment #3
znerol commentedThe intention of this piece of code is to only take the "authenticated user" role into account when the user does not have any additional roles. The current implementation does not look to trustworthy and I've rewritten this part for the 2.x version. I've backported the new mechanism into the 1.x-tree (see attached patch). Would you mind testing it on the affected installation and report back whether it works?
Comment #4
znerol commentedComment #5
znerol commentedCommitted: 0d90771.