[horde] Error on the login page while using a hook

Chuck Hagenbuch chuck at horde.org
Fri Oct 18 19:04:23 PDT 2002


Quoting "Gilbert, Marie-Christine" <Marie-Christine.Gilbert at microcell.ca>:

> Finally, in the _setValue(Prefs.php) function we discovered that
> "$this->_prefs[$pref]['val']" is called but it has not been initialized
> yet. We have added that little piece of code in the _setValue(Prefs.php)
> function to initialize the variable and it seems to work.

We do seem to have been missing that, so I've added the check to CVS. However:

> 	  if (!array_key_exists($pref, $this->_prefs)) {
> 		$this->_prefs[$pref]['val'] = $val;
> 		$this->_prefs[$pref]['mask'] = 0;
> 	  } else {
>             if(($this->_prefs[$pref]['val'] == $val) &&
> !$this->isDefault($pref)) {
> 		    return true;
> 	       }
>         }

This won't work; use what I committed. Also, that value _should_ have
already been initialized, when setDefaults() was called, so something else
is going wrong somewhere - but I have no idea what it is.

-chuck

--
Charles Hagenbuch, <chuck at horde.org>
"People ask me all the time what it will be like living without otters."
 - Google, thanks to Harpers


More information about the horde mailing list