diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 4a5f5b132f2..c5c651382b5 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1944,7 +1944,7 @@ static zend_result spl_filesystem_file_read_csv(spl_filesystem_object *intern, c } /* }}} */ -static zend_result spl_filesystem_file_read_line_ex(zval * this_ptr, spl_filesystem_object *intern, int silent) /* {{{ */ +static zend_result spl_filesystem_file_read_line_ex(zval * this_ptr, spl_filesystem_object *intern, bool silent) /* {{{ */ { zval retval; @@ -2026,7 +2026,7 @@ static bool spl_filesystem_file_is_empty_line(spl_filesystem_object *intern) /* } /* }}} */ -static zend_result spl_filesystem_file_read_line(zval * this_ptr, spl_filesystem_object *intern, int silent) /* {{{ */ +static zend_result spl_filesystem_file_read_line(zval * this_ptr, spl_filesystem_object *intern, bool silent) /* {{{ */ { zend_result ret = spl_filesystem_file_read_line_ex(this_ptr, intern, silent); @@ -2052,7 +2052,7 @@ static void spl_filesystem_file_rewind(zval * this_ptr, spl_filesystem_object *i intern->u.file.current_line_num = 0; } if (SPL_HAS_FLAG(intern->flags, SPL_FILE_OBJECT_READ_AHEAD)) { - spl_filesystem_file_read_line(this_ptr, intern, 1); + spl_filesystem_file_read_line(this_ptr, intern, /* silent */ true); } } /* }}} */ @@ -2206,7 +2206,7 @@ PHP_METHOD(SplFileObject, current) CHECK_SPL_FILE_OBJECT_IS_INITIALIZED(intern); if (!intern->u.file.current_line && Z_ISUNDEF(intern->u.file.current_zval)) { - spl_filesystem_file_read_line(ZEND_THIS, intern, 1); + spl_filesystem_file_read_line(ZEND_THIS, intern, /* silent */ true); } if (intern->u.file.current_line && (!SPL_HAS_FLAG(intern->flags, SPL_FILE_OBJECT_READ_CSV) || Z_ISUNDEF(intern->u.file.current_zval))) { RETURN_STRINGL(intern->u.file.current_line, intern->u.file.current_line_len); @@ -2228,7 +2228,7 @@ PHP_METHOD(SplFileObject, key) /* Do not read the next line to support correct counting with fgetc() if (!intern->u.file.current_line) { - spl_filesystem_file_read_line(ZEND_THIS, intern, 1); + spl_filesystem_file_read_line(ZEND_THIS, intern, silent true); } */ RETURN_LONG(intern->u.file.current_line_num); } /* }}} */ @@ -2244,7 +2244,7 @@ PHP_METHOD(SplFileObject, next) spl_filesystem_file_free_line(intern); if (SPL_HAS_FLAG(intern->flags, SPL_FILE_OBJECT_READ_AHEAD)) { - spl_filesystem_file_read_line(ZEND_THIS, intern, 1); + spl_filesystem_file_read_line(ZEND_THIS, intern, /* silent */ true); } intern->u.file.current_line_num++; } /* }}} */ @@ -2743,7 +2743,7 @@ PHP_METHOD(SplFileObject, seek) spl_filesystem_file_rewind(ZEND_THIS, intern); for (i = 0; i < line_pos; i++) { - if (spl_filesystem_file_read_line(ZEND_THIS, intern, 1) == FAILURE) { + if (spl_filesystem_file_read_line(ZEND_THIS, intern, /* silent */ true) == FAILURE) { return; } }