cvs: php-src /ext/spl spl_directory.c
| From: | Antony Dovgal | Date: | Fri, 10 Feb 2006 16:56:56 +0000 |
| Subject: | cvs: php-src /ext/spl spl_directory.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-36846@lists.php.net to get a copy of this message | ||
tony2001 Fri Feb 10 16:56:56 2006 UTC
Modified files:
/php-src/ext/spl spl_directory.c
Log:
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.73&r2=1.74&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.73 php-src/ext/spl/spl_directory.c:1.74
--- php-src/ext/spl/spl_directory.c:1.73 Sun Feb 5 23:31:47 2006
+++ php-src/ext/spl/spl_directory.c Fri Feb 10 16:56:56 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_directory.c,v 1.73 2006/02/05 23:31:47 helly Exp $ */
+/* $Id: spl_directory.c,v 1.74 2006/02/10 16:56:56 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -1809,13 +1809,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) {