6.0.0-alpha10
5/17/25

[#8122] require_once inside of functions are dangerous
Summary require_once inside of functions are dangerous
Queue IMP
Queue Version 4.3.3
Type Bug
State Resolved
Priority 1. Low
Owners
Requester earnie (at) users (dot) sourceforge (dot) net
Created 03/26/2009 (5896 days ago)
Due
Updated 03/30/2009 (5892 days ago)
Assigned
Resolved 03/27/2009 (5895 days ago)
Milestone
Patch No

History
03/30/2009 12:56:53 PM earnie (at) users (dot) sourceforge (dot) net Comment #3 Reply to this comment
You are NOT using 4.3.3. This was fixed almost two years ago, before
IMP 4.2.0 was released, by this commit:
http://cvs.horde.org/co.php/imp/lib/MIME/Headers.php?r=1.92.2.29
Now I remember the reasons why I don't like automated installers such 
as apt-get.  They make one too lazy and make one use assumptions that 
aren't true.  Sorry for the noise.
03/27/2009 08:31:46 PM Chuck Hagenbuch Comment #2
State ⇒ Resolved
Priority ⇒ 1. Low
Reply to this comment
You are NOT using 4.3.3. This was fixed almost two years ago, before 
IMP 4.2.0 was released, by this commit:

http://cvs.horde.org/co.php/imp/lib/MIME/Headers.php?r=1.92.2.29
03/26/2009 03:56:46 PM earnie (at) users (dot) sourceforge (dot) net Comment #1
Priority ⇒ 3. High
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ require_once inside of functions are dangerous
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
When using require_once for things like IMP_BASE . 
'/config/header.php' and the file has

been included once already the second occurrence causes the $_header 
array to not be

defined and errors are issued to the user.  I changed line 133 of 
lib/MIME/Headers.php

substituting "require_once" with "require" to resolve the issue.  I 
only noticed the

issue when reporting spam.  Please excuse the lame report; I don't 
have time to chase a

proper patch (the usual cry from users).



PHP 5.2.4-2ubuntu5.5 with Suhosin-Patch 0.9.6.2 (cli) (built: Feb 11 
2009 20:09:52)

Saved Queries