iliaa Mon May 18 18:46:07 2009 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard file.c
/php-src NEWS
Log:
MFB: Fixed bug #48313 (fgetcsv() does not return null for empty rows)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.41&r2=1.409.2.6.2.42&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.409.2.6.2.41
php-src/ext/standard/file.c:1.409.2.6.2.42
--- php-src/ext/standard/file.c:1.409.2.6.2.41 Fri May 8 09:49:27 2009
+++ php-src/ext/standard/file.c Mon May 18 18:46:06 2009
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.409.2.6.2.41 2009/05/08 09:49:27 lbarnaud Exp $ */
+/* $Id: file.c,v 1.409.2.6.2.42 2009/05/18 18:46:06 iliaa Exp $ */
/* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
@@ -2384,8 +2384,12 @@
}
/* 3. Now pass our field back to php */
- *comp_end = '\0';
- add_next_index_stringl(return_value, temp, comp_end - temp, 1);
+ if (comp_end - temp) {
+ *comp_end = '\0';
+ add_next_index_stringl(return_value, temp, comp_end -
temp, 1);
+ } else {
+ add_next_index_null(return_value);
+ }
} while (inc_len > 0);
out:
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1513&r2=1.2027.2.547.2.1514&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1513 php-src/NEWS:1.2027.2.547.2.1514
--- php-src/NEWS:1.2027.2.547.2.1513 Sun May 17 14:59:24 2009
+++ php-src/NEWS Mon May 18 18:46:06 2009
@@ -16,6 +16,7 @@
- Fixed segfault on invalid session.save_path. (Hannes)
- Fixed leaks in imap when a mail_criteria is used. (Pierre)
+- Fixed bug #48313 (fgetcsv() does not return null for empty rows). (Ilia)
- Fixed bug #48309 (stream_copy_to_stream() and fpasstru() do not update stream
position of plain files). (Arnaud)
- Fixed bug #48307 (stream_copy_to_stream() copies 0 bytes when $source is a
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php