size_t temp_len, line_end_len;
int inc_len;
+ zend_bool first_field = 1;
/* initialize internal state */
php_mblen(NULL, 0);
}
quit_loop_1:
+ if (first_field && bptr == line_end) {
+ add_next_index_null(return_value);
+ break;
+ }
+ first_field = 0;
/* 2. Read field, leaving bptr pointing at start of next field */
if (inc_len != 0 && *bptr == enclosure) {
int state = 0;
}
/* 3. Now pass our field back to php */
- 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);
- }
+ *comp_end = '\0';
+ add_next_index_stringl(return_value, temp, comp_end - temp, 1);
} while (inc_len > 0);
out:
response_code = 0;
}
/* when we request only the header, don't fail even on error codes */
- if (options & STREAM_ONLY_GET_HEADERS) {
+ if ((options & STREAM_ONLY_GET_HEADERS) ||
+ (context && php_stream_context_get_option(context, "http", "ignore_errors", &tmpzval) == SUCCESS && zend_is_true(*tmpzval)) ) {
reqok = 1;
}
switch(response_code) {
-- Testing fgetcsv() with file opened using r mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using rb mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using rt mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using r+ mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using r+b mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using r+t mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using a+ mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using a+b mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using a+t mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using w+ mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using w+b mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using w+t mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using x+ mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using x+b mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using x+t mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using r mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using rb mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using rt mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using r+ mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using r+b mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using r+t mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using a+ mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using a+b mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using a+t mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using w+ mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using w+b mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using w+t mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using x+ mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using x+b mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)
-- Testing fgetcsv() with file opened using x+t mode --
array(1) {
[0]=>
- string(0) ""
+ NULL
}
int(1)
bool(false)