diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-11-18 13:41:21 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-11-30 16:03:37 +0100 |
commit | f1d11c118dfdc911f2f33babb9b2cba8bf5acb67 (patch) | |
tree | 4959b0868ca862b6c31ea99a9541808ba55dba93 /sapi/phpdbg/phpdbg_prompt.c | |
parent | 841b00f641d448f037c69f0910ec4fb54cd64b20 (diff) | |
download | php-git-f1d11c118dfdc911f2f33babb9b2cba8bf5acb67.tar.gz |
Fix #62004: SplFileObject: fgets after seek returns wrong line
As it is, `::seek(0)` sets the file pointer to the beginning of the
file, but `::seek($n)` where `$n > 0` sets the file pointer to the
beginning of the following line, having line `$n` already read into the
line buffer. This is pretty inconsistent; we fix it by always seeking
to the beginning of the line.
We also add a test case for the duplicate bug #46569.
Closes GH-6434.
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
0 files changed, 0 insertions, 0 deletions