iliaa           Mon Jan 23 15:24:10 2006 UTC

  Modified files:              (Branch: PHP_5_1)
    /php-src/ext/spl    spl_directory.c 
    /php-src    NEWS 
  Log:
  Fixed bug #36134 (DirectoryIterator constructor failed to detect empty 
  directory names).
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.12&r2=1.45.2.13&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.45.2.12 
php-src/ext/spl/spl_directory.c:1.45.2.13
--- php-src/ext/spl/spl_directory.c:1.45.2.12   Sun Jan 15 00:17:43 2006
+++ php-src/ext/spl/spl_directory.c     Mon Jan 23 15:24:10 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: spl_directory.c,v 1.45.2.12 2006/01/15 00:17:43 helly Exp $ */
+/* $Id: spl_directory.c,v 1.45.2.13 2006/01/23 15:24:10 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -393,6 +393,12 @@
                return;
        }
 
+       if (!len) {
+               php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
+                zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, 
"Directory name must not be empty.");
+                return;
+       }
+
        intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
        spl_filesystem_dir_open(intern, path TSRMLS_CC);
        intern->u.dir.is_recursive = instanceof_function(intern->std.ce, 
spl_ce_RecursiveDirectoryIterator TSRMLS_CC) ? 1 : 0;
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.372&r2=1.2027.2.373&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.372 php-src/NEWS:1.2027.2.373
--- php-src/NEWS:1.2027.2.372   Sun Jan 22 21:01:51 2006
+++ php-src/NEWS        Mon Jan 23 15:24:10 2006
@@ -9,6 +9,8 @@
   MYSQLI_TYPE_NEWDECIMAL and MYSQLI_TYPE_BIT. FR #36007. (Georg)
 - Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE
   on error. (Pierre)
+- Fixed bug #36134 (DirectoryIterator constructor failed to detect empty 
+  directory names). (Ilia)
 - Fixed bug #36096 (oci_result() returns garbage after oci_fetch() failed). 
   (Tony)
 - Fixed bug #36071 (Engine Crash related with 'clone'). (Dmitry)

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

Reply via email to