mirror of
https://github.com/php/php-src.git
synced 2026-03-27 01:32:22 +01:00
Fixed bug #48313 (fgetcsv() does not return null for empty rows)
This commit is contained in:
@@ -2343,8 +2343,12 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, char
|
||||
}
|
||||
|
||||
/* 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:
|
||||
|
||||
Reference in New Issue
Block a user