helly Sat Jul 15 14:54:57 2006 UTC Modified files: /php-src/ext/spl spl_directory.c Log: - Be on the safe side http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.95&r2=1.96&diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.95 php-src/ext/spl/spl_directory.c:1.96 --- php-src/ext/spl/spl_directory.c:1.95 Sat Jul 15 14:50:38 2006 +++ php-src/ext/spl/spl_directory.c Sat Jul 15 14:54:57 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_directory.c,v 1.95 2006/07/15 14:50:38 helly Exp $ */ +/* $Id: spl_directory.c,v 1.96 2006/07/15 14:54:57 helly Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -1450,6 +1450,10 @@ size_t buf_len = intern->u.file.current_line_len; char *buf = estrndup(intern->u.file.current_line, buf_len); + if (Z_TYPE_P(return_value) != IS_NULL) { + zval_dtor(return_value); + ZVAL_NULL(return_value); + } php_fgetcsv(intern->u.file.stream, delimiter, enclosure, buf_len, buf, return_value TSRMLS_CC); } return ret;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php