@@ -1944,7 +1944,7 @@ static zend_result spl_filesystem_file_read_csv(spl_filesystem_object *intern, c
1944
1944
}
1945
1945
/* }}} */
1946
1946
1947
- static zend_result spl_filesystem_file_read_line_ex (zval * this_ptr , spl_filesystem_object * intern , int silent ) /* {{{ */
1947
+ static zend_result spl_filesystem_file_read_line_ex (zval * this_ptr , spl_filesystem_object * intern , bool silent ) /* {{{ */
1948
1948
{
1949
1949
zval retval ;
1950
1950
@@ -2026,7 +2026,7 @@ static bool spl_filesystem_file_is_empty_line(spl_filesystem_object *intern) /*
2026
2026
}
2027
2027
/* }}} */
2028
2028
2029
- static zend_result spl_filesystem_file_read_line (zval * this_ptr , spl_filesystem_object * intern , int silent ) /* {{{ */
2029
+ static zend_result spl_filesystem_file_read_line (zval * this_ptr , spl_filesystem_object * intern , bool silent ) /* {{{ */
2030
2030
{
2031
2031
zend_result ret = spl_filesystem_file_read_line_ex (this_ptr , intern , silent );
2032
2032
@@ -2052,7 +2052,7 @@ static void spl_filesystem_file_rewind(zval * this_ptr, spl_filesystem_object *i
2052
2052
intern -> u .file .current_line_num = 0 ;
2053
2053
}
2054
2054
if (SPL_HAS_FLAG (intern -> flags , SPL_FILE_OBJECT_READ_AHEAD )) {
2055
- spl_filesystem_file_read_line (this_ptr , intern , 1 );
2055
+ spl_filesystem_file_read_line (this_ptr , intern , /* silent */ true );
2056
2056
}
2057
2057
} /* }}} */
2058
2058
@@ -2206,7 +2206,7 @@ PHP_METHOD(SplFileObject, current)
2206
2206
CHECK_SPL_FILE_OBJECT_IS_INITIALIZED (intern );
2207
2207
2208
2208
if (!intern -> u .file .current_line && Z_ISUNDEF (intern -> u .file .current_zval )) {
2209
- spl_filesystem_file_read_line (ZEND_THIS , intern , 1 );
2209
+ spl_filesystem_file_read_line (ZEND_THIS , intern , /* silent */ true );
2210
2210
}
2211
2211
if (intern -> u .file .current_line && (!SPL_HAS_FLAG (intern -> flags , SPL_FILE_OBJECT_READ_CSV ) || Z_ISUNDEF (intern -> u .file .current_zval ))) {
2212
2212
RETURN_STRINGL (intern -> u .file .current_line , intern -> u .file .current_line_len );
@@ -2228,7 +2228,7 @@ PHP_METHOD(SplFileObject, key)
2228
2228
2229
2229
/* Do not read the next line to support correct counting with fgetc()
2230
2230
if (!intern->u.file.current_line) {
2231
- spl_filesystem_file_read_line(ZEND_THIS, intern, 1 );
2231
+ spl_filesystem_file_read_line(ZEND_THIS, intern, silent true );
2232
2232
} */
2233
2233
RETURN_LONG (intern -> u .file .current_line_num );
2234
2234
} /* }}} */
@@ -2244,7 +2244,7 @@ PHP_METHOD(SplFileObject, next)
2244
2244
2245
2245
spl_filesystem_file_free_line (intern );
2246
2246
if (SPL_HAS_FLAG (intern -> flags , SPL_FILE_OBJECT_READ_AHEAD )) {
2247
- spl_filesystem_file_read_line (ZEND_THIS , intern , 1 );
2247
+ spl_filesystem_file_read_line (ZEND_THIS , intern , /* silent */ true );
2248
2248
}
2249
2249
intern -> u .file .current_line_num ++ ;
2250
2250
} /* }}} */
@@ -2743,7 +2743,7 @@ PHP_METHOD(SplFileObject, seek)
2743
2743
spl_filesystem_file_rewind (ZEND_THIS , intern );
2744
2744
2745
2745
for (i = 0 ; i < line_pos ; i ++ ) {
2746
- if (spl_filesystem_file_read_line (ZEND_THIS , intern , 1 ) == FAILURE ) {
2746
+ if (spl_filesystem_file_read_line (ZEND_THIS , intern , /* silent */ true ) == FAILURE ) {
2747
2747
return ;
2748
2748
}
2749
2749
}
0 commit comments