[Tickets #14452] Re: Cannot redeclare class Horde_Hooks

noreply at bugs.horde.org noreply at bugs.horde.org
Thu Aug 25 14:14:11 UTC 2016


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

Ticket URL: https://bugs.horde.org/ticket/14452
------------------------------------------------------------------------------
  Ticket             | 14452
  Updated By         | Michael Rubinsky <mrubinsk at horde.org>
  Summary            | Cannot redeclare class Horde_Hooks
  Queue              | Horde Groupware Webmail Edition
  Version            | 5.2.15
  Type               | Bug
  State              | Not A Bug
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


Michael Rubinsky <mrubinsk at horde.org> (2016-08-25 14:14) wrote:

>> Where did you see that you need to create a *.local.php version of
>> the hooks file?
>
> I anticipated this pattern from other places to prevent updates from  
> overwriting my changes.

Understandable, though the header of the hooks file explains  
differently since this doesn't work with files that contain class  
declarations.


>> This file declares the Horde_Hooks class, therefore
>> cannot be loaded more than once. All hooks need to be created in the
>> hooks.php file.
>
> I don't have a hooks.php file, only the hooks.local.php.
> I moved hooks.local.php to hooks.php with the same result. It  
> doesn't make the error disappear.

Horde is distributed with a hooks.php.dist file that needs to be moved  
to hooks.php if any hooks need to be defined. If you are still getting  
this error, you must still have another file being loaded that  
contains the Horde_Hooks class declaration (or for some reason you  
have it multiple times in your own file).






More information about the bugs mailing list