summaryrefslogtreecommitdiff
path: root/ext/standard/file.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2011-09-13 12:44:13 +0000
committerXinchen Hui <laruence@php.net>2011-09-13 12:44:13 +0000
commit54d48bb31f74991c28d7654242112928b9f03b0c (patch)
treec9aa9e312ce1c555062ea4b9b79b26cc6302af72 /ext/standard/file.c
parentb108db222e06349d56f7f53c224f2df4012975a4 (diff)
downloadphp-git-54d48bb31f74991c28d7654242112928b9f03b0c.tar.gz
Fixed Bug #55674 (fgetcsv & str_getcsv skip empty fields in some tab-separated records) which was introduced by r311543
Diffstat (limited to 'ext/standard/file.c')
-rw-r--r--ext/standard/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index ef5f215c36..e86b21c7a6 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -2051,7 +2051,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, char
inc_len = (bptr < limit ? (*bptr == '\0' ? 1: php_mblen(bptr, limit - bptr)): 0);
if (inc_len == 1) {
char *tmp = bptr;
- while (isspace((int)*(unsigned char *)tmp)) {
+ while ((*tmp != delimiter) && isspace((int)*(unsigned char *)tmp)) {
tmp++;
}
if (*tmp == enclosure) {