summaryrefslogtreecommitdiff
path: root/ext/standard/file.c
diff options
context:
space:
mode:
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) {