@@ -1944,7 +1944,7 @@ static zend_result spl_filesystem_file_read_csv(spl_filesystem_object *intern, c
19441944}
19451945/* }}} */
19461946
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 ) /* {{{ */
19481948{
19491949 zval retval ;
19501950
@@ -2026,7 +2026,7 @@ static bool spl_filesystem_file_is_empty_line(spl_filesystem_object *intern) /*
20262026}
20272027/* }}} */
20282028
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 ) /* {{{ */
20302030{
20312031 zend_result ret = spl_filesystem_file_read_line_ex (this_ptr , intern , silent );
20322032
@@ -2052,7 +2052,7 @@ static void spl_filesystem_file_rewind(zval * this_ptr, spl_filesystem_object *i
20522052 intern -> u .file .current_line_num = 0 ;
20532053 }
20542054 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 );
20562056 }
20572057} /* }}} */
20582058
@@ -2206,7 +2206,7 @@ PHP_METHOD(SplFileObject, current)
22062206 CHECK_SPL_FILE_OBJECT_IS_INITIALIZED (intern );
22072207
22082208 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 );
22102210 }
22112211 if (intern -> u .file .current_line && (!SPL_HAS_FLAG (intern -> flags , SPL_FILE_OBJECT_READ_CSV ) || Z_ISUNDEF (intern -> u .file .current_zval ))) {
22122212 RETURN_STRINGL (intern -> u .file .current_line , intern -> u .file .current_line_len );
@@ -2228,7 +2228,7 @@ PHP_METHOD(SplFileObject, key)
22282228
22292229 /* Do not read the next line to support correct counting with fgetc()
22302230 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 );
22322232 } */
22332233 RETURN_LONG (intern -> u .file .current_line_num );
22342234} /* }}} */
@@ -2244,7 +2244,7 @@ PHP_METHOD(SplFileObject, next)
22442244
22452245 spl_filesystem_file_free_line (intern );
22462246 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 );
22482248 }
22492249 intern -> u .file .current_line_num ++ ;
22502250} /* }}} */
@@ -2743,7 +2743,7 @@ PHP_METHOD(SplFileObject, seek)
27432743 spl_filesystem_file_rewind (ZEND_THIS , intern );
27442744
27452745 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 ) {
27472747 return ;
27482748 }
27492749 }
0 commit comments