Hi, All

In the Zend_Loader source code line 135 is:

if (empty($dirs)) {

if there is a directory named '0'.And there are some classes need to be load
in it.
the directory '0' is lost by next line $dirs = array(), because empty($dirs)
is true.

Sure, it's too bad to name a directory as '0', but it's possible, isn't it?

Here is my patch:

Index: Loader.php
===================================================================
--- Loader.php    (revision 5525)
+++ Loader.php    (working copy)
@@ -132,7 +132,7 @@
        /**
         * Search for the file in each of the dirs named in $dirs.
         */
-        if (empty($dirs)) {
+        if (is_null($dirs)) {
            $dirs = array();
        } elseif (is_string($dirs))  {
            $dirs = explode(PATH_SEPARATOR, $dirs);

It dosen't matter that $dirs is '', explode can handle this case.
--
广州市一方信息咨询有限公司
地址:广州市 江南大道中 穗花村 三巷12号204
邮编:510245
电话:020-39738561 020-39738571
传真:020-84476279
网站:www.i-fang.com
[EMAIL PROTECTED]

Attachment: Loader-2007-06-30.patch
Description: Binary data

Reply via email to