tony2001                Fri Feb 10 16:57:57 2006 UTC

  Modified files:              (Branch: PHP_5_1)
    /php-src/ext/spl    spl_directory.c 
    /php-src    NEWS 
  Log:
  MFH: fix #36359 (splFileObject::fwrite() doesn't write when no data length 
specified)
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.19&r2=1.45.2.20&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.45.2.19 
php-src/ext/spl/spl_directory.c:1.45.2.20
--- php-src/ext/spl/spl_directory.c:1.45.2.19   Sun Feb  5 19:23:30 2006
+++ php-src/ext/spl/spl_directory.c     Fri Feb 10 16:57:56 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: spl_directory.c,v 1.45.2.19 2006/02/05 19:23:30 tony2001 Exp $ */
+/* $Id: spl_directory.c,v 1.45.2.20 2006/02/10 16:57:56 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -1801,13 +1801,13 @@
        char *str;
        int str_len;
        int ret;
-       long length;
+       long length = 0;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &str, 
&str_len, &length) == FAILURE) {
                return;
        }
 
-       if (ZEND_NUM_ARGS() < 2) {
+       if (ZEND_NUM_ARGS() > 1) {
                str_len = MAX(0, MIN(length, str_len));
        }
        if (!str_len) {
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.408&r2=1.2027.2.409&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.408 php-src/NEWS:1.2027.2.409
--- php-src/NEWS:1.2027.2.408   Wed Feb  8 23:43:48 2006
+++ php-src/NEWS        Fri Feb 10 16:57:56 2006
@@ -20,6 +20,8 @@
 - Added imap_savebody() that allows message body to be written to a file. 
(Mike)
 - Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE
   on error. (Pierre)
+- Fixed bug #36359 (splFileObject::fwrite() doesn't write when no data length 
+  specified). (Tony)
 - Fixed bug #36334 (Added missing documentation about realpath cache INI 
   settings). (Ilia)
 - Fixed bug #36308 (ReflectionProperty::getDocComment() does not reflect 

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

Reply via email to