Re: cvs: php-src(PHP_5_3) /ext/standard file.c
| From: | Jani Taskinen | Date: | Mon, 18 May 2009 21:19:14 +0000 |
| Subject: | Re: cvs: php-src(PHP_5_3) /ext/standard file.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-57971@lists.php.net to get a copy of this message | ||
What about HEAD?
--Jani
Ilia Alshanetsky kirjoitti:
iliaa Mon May 18 18:45:30 2009 UTCModified files: (Branch: PHP_5_3) /php-src/ext/standard file.c Log: 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.28.2.32&r2=1.409.2.6.2.28.2.33&diff_format=uIndex: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.409.2.6.2.28.2.32 php-src/ext/standard/file.c:1.409.2.6.2.28.2.33 --- php-src/ext/standard/file.c:1.409.2.6.2.28.2.32 Fri May 8 09:44:17 2009 +++ php-src/ext/standard/file.c Mon May 18 18:45:30 2009 @@ -21,7 +21,7 @@+----------------------------------------------------------------------+*/ -/* $Id: file.c,v 1.409.2.6.2.28.2.32 2009/05/08 09:44:17 lbarnaud Exp $ */ +/* $Id: file.c,v 1.409.2.6.2.28.2.33 2009/05/18 18:45:30 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2343,8 +2343,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: