helly           Mon Feb 19 20:34:29 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src    NEWS 
    /php-src/ext/spl    spl_directory.c 
  Log:
  - Bugfix #40546: SplFileInfo::getPathInfo() throws an execption if directory 
is in root dir.
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.548&r2=1.2027.2.547.2.549&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.548 php-src/NEWS:1.2027.2.547.2.549
--- php-src/NEWS:1.2027.2.547.2.548     Mon Feb 19 17:32:54 2007
+++ php-src/NEWS        Mon Feb 19 20:34:29 2007
@@ -6,9 +6,11 @@
   . libpq (PostgreSQL) to version 8.2.3
 - Upgraded SQLite 3 to version 3.3.12 (Ilia)
 - Upgraded PCRE to version 7.0 (Nuno)
-- Add --ri switch to CLI which allows to check extension information. (Marcus)
+- Added --ri switch to CLI which allows to check extension information. 
(Marcus)
 - Added tidyNode::getParent() method (John, Nuno)
 - Fixed zend_llist_remove_tail (Michael Wallner, Dmitry)
+- Fixed bug #40546 (SplFileInfo::getPathInfo() throws an execption if directory
+  is in root dir). (Marcus)
 - Fixed bug #40503 (json_encode() value corruption on 32bit systems with 
   overflown values). (Ilia)
 - Fixed bug #40467 (Partial SOAP request sent when XSD sequence or choice
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.13&r2=1.45.2.27.2.14&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.45.2.27.2.13 
php-src/ext/spl/spl_directory.c:1.45.2.27.2.14
--- php-src/ext/spl/spl_directory.c:1.45.2.27.2.13      Mon Jan  1 09:36:07 2007
+++ php-src/ext/spl/spl_directory.c     Mon Feb 19 20:34:29 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: spl_directory.c,v 1.45.2.27.2.13 2007/01/01 09:36:07 sebastian Exp $ */
+/* $Id: spl_directory.c,v 1.45.2.27.2.14 2007/02/19 20:34:29 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -319,14 +319,23 @@
 {
        spl_filesystem_object *intern;
        zval *arg1;
-       
+
        if (!file_path || !file_path_len) {
+#if defined(PHP_WIN32)
                zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, 
"Cannot create SplFileInfo for empty path");
                if (file_path && !use_copy)
                {
                        efree(file_path);
                }
                return NULL;
+#else
+               if (file_path && !use_copy) {
+                       efree(file_path);
+               }
+               use_copy = 1;
+               file_path_len = 1;
+               file_path = "/";
+#endif
        }
 
        php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to