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
commit84c94e29c9bb7c3b27d7b4fb41c599fb774f4faf (patch)
tree51badb9cee263ff967c9a9b81deae2127895b7d0 /ext/standard/file.c
parent3996135f685ed360891a56b165ba0e2fd3820eb6 (diff)
downloadphp-git-84c94e29c9bb7c3b27d7b4fb41c599fb774f4faf.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 3ef8980f24..4240e74e81 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) {