[development] The static $perm variable in user_access reset erroneously

Earnie Boyd earnie at users.sourceforge.net
Fri Oct 31 21:26:46 UTC 2008


Quoting Ron Parker <sysop at scbbs.com>:

> On Fri , Oct 31, 2008 at 12:27 AM, David Metzler < 
> metzlerd at metzlerd.com >wrote:
>
>> It sounds like you're suggesting that $perm, a static variable within
>> user_access() is being modified without user_access being called, but within
>> a single page load. That doesn't seem possible in PHP, unless there is a
>> PHP bug. Static variables are supposed to be local in scope to the
>> functions that create them. To prove beyond a shadow of doubt, put a $debug
>> statement in at the very beginning of the function user_access and another
>> at the very end of the function. (just before the return). If what you're
>
> This is exactly what I'm suggesting. I put debug statements in 
> user_access, node_content_access, and my OGUR function so that I 
> would see every time they were accessed, and what was in them.
>

Would you be getting bit by caching?  Try a cache_clear_all() in your code.

Earnie -- http://for-my-kids.com/
-- http://give-me-an-offer.com/



More information about the development mailing list