6.0.0-beta1
7/6/25

[#13111] hooks not working due to loadConfiguration() flaw
Summary hooks not working due to loadConfiguration() flaw
Queue Horde Base
Queue Version FRAMEWORK_5_1
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester maciej.uhlig (at) us (dot) edu (dot) pl
Created 04/12/2014 (4103 days ago)
Due 04/13/2014 (4102 days ago)
Updated 04/12/2014 (4103 days ago)
Assigned
Resolved 04/12/2014 (4103 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
04/12/2014 08:08:13 PM maciej (dot) uhlig (at) us (dot) edu (dot) pl Comment #3 Reply to this comment
Indeed (unfortunately).

04/12/2014 04:33:09 PM Michael Rubinsky Summary ⇒ hooks not working due to loadConfiguration() flaw
 
04/12/2014 04:32:56 PM Michael Rubinsky Comment #2
State ⇒ Not A Bug
Priority ⇒ 1. Low
Reply to this comment
Your configuration/hooks file has unexpected whitespace outside of the 
<?php tags.
04/12/2014 12:40:37 PM maciej (dot) uhlig (at) us (dot) edu (dot) pl Comment #1
Priority ⇒ 3. High
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Horde Base
Due ⇒ 04/13/2014
Summary ⇒ hooks not working due to loacConfiguration() flaw
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
Trying to use Horde hooks funcionality I encountered problems due to 
impossibility of loading configuration file containing Horde_Hooks 
class. xdebug shown exception in line 372 of Horde.php 
loadConfiguration():

     0.0351    1621528                           -> sprintf('Failed to 
import configuration file "%s": ', 
'/data/var/www/webmail_test/lib/../config/hooks.php') 
/usr/share/pear/Horde.php:372
                                                  >=> 'Failed to 
import configuration file 
"/data/var/www/webmail_test/lib/../config/hooks.php": '
     0.0352    1621720                           -> strip_tags('\t\t') 
/usr/share/pear/Horde.php:372
                                                  >=> '\t\t'
     0.0352    1621576                           -> 
Exception->__construct('Failed to import configuration file 
"/data/var/www/webmail_test/lib/../config/hooks.php": \t\t') 
/usr/share/pear/Horde.php:372

Please note in this case $output is expected to be '' however it's 
equal to '\t\t' (God knows why) and line 363 condition is evaluated 
while it shouldn't be.

The simple solution is to add after line 357 line:

$output = trim($output);

This fix removes the problem.

Saved Queries