[dev] Fwd: include vs include_once in Horde_Autoloader

Michael Rubinsky mrubinsk at horde.org
Tue Aug 4 21:04:31 UTC 2009


Quoting Chuck Hagenbuch <chuck at horde.org>:

> Anything being the same? Or when our classes aren't properly  
> namespaced yet? If the latter, we should just fix our classes. If  
> the former, well that sucks.

It sucks.

The specific issue is with classes located in the root of the lib/  
directory. i.e. Kronolith_Day is defined in the file  
kronolith/lib/Day.php. If kronolith was at any time pushed on the  
stack during the current request, then kronolith/lib is present in the  
include_path. The result of this is that something like:
<code>
if (class_exists('Day')) {
...
}
</code>

in an external library will result in kronolith/lib/Day.php being included.




Thanks,
mike

--
The Horde Project (www.horde.org)
mrubinsk at horde.org

"Time just hates me. That's why it made me an adult." - Josh Joplin


More information about the dev mailing list