[Tickets #5687] Re: guest can't access tickets whups

bugs at bugs.horde.org bugs at bugs.horde.org
Tue Oct 2 08:30:37 UTC 2007


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=5687
-----------------------------------------------------------------------
 Ticket             | 5687
 Updated By         | lee_tao86 at yahoo.com
 Summary            | guest can't access tickets whups
 Queue              | Whups
 Type               | Bug
 State              | Assigned
 Priority           | 2. Medium
 Owners             | Horde Developers, Chuck Hagenbuch
-----------------------------------------------------------------------


lee_tao86 at yahoo.com (2007-10-02 01:30) wrote:

dear developer,

i think i finally know what's happening with this problem..

i tried add code print 'connect' in every if { } in the datatree.php and
finally i reached one function that cause that error.

n Horde/Perms/datatree.php

  function &getPermission($name)
    {
        /* Cache of previously retrieved permissions. */
        static $permsCache = array();

	if (isset($permsCache[$name])) {
           // print 'masuk';
		return $permsCache[$name];
        }
	
        $perm = $this->_cache->get('perm_' . $name,
$GLOBALS['conf']['cache']['default_lifetime']);
-----------------------------------------------------------        
	if ($perm == false) { ==>> THIS IS THE ERROR.. THE ORIGINAL CODE IS ===,
there are three =, after i changed this, whups can run again with no
error.
------------------------------------------------------------   
            $perm = $this->_datatree->getObject($name,
'DataTreeObject_Permission');
            $this->_cache->set('perm_' . $name, serialize($perm),
$GLOBALS['conf']['cache']['default_lifetime']);
            $permsCache[$name] = $perm;
        } else {
            $permsCache[$name] = unserialize($perm);
        }

        return $permsCache[$name];
    }

i don't know what's wrong with this..i'm still wondering whether my php
5.2.4 support that kind of code..

anyway, i can use whups now. thanks for all your help.




More information about the bugs mailing list