[php-src] PR #20473: phar: Fix SplFileInfo::openFile() in write mode
| From: | ndossche | Date: | Thu, 13 Nov 2025 21:58:30 +0000 |
| Subject: | [php-src] PR #20473: phar: Fix SplFileInfo::openFile() in write mode | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-34043@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/20473
Author: ndossche
This stopped working after e735d2bc3b because fp_refcount is increased, making phar think that the
file has open read pointers. To fix this, the refcount shouldn't be increased but that would
re-introduce the previous bug.
However, 6fe40de6e fixed a bug that makes us hold onto the phar archive too. That fix also fixes the
original issue, so we can just remove the fp_refcount modification.
Add a test to prevent this issue in the future.