Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Filesystem] Fix dumpFile
stat failed
error hitting custom handler
Since #54471, dumpFile will trigger a `fileperms(): stat failed` error when writing to a filename that does not yet exist. This was silenced from PHP's default handler with the `@` operator. However, the error is still passed to any custom handler that the application has registered, and can therefore cause exceptions or spurious logging depending on the implementation of the handler. The better solution, which is consistent with all other calls to native functions in this class, would be to use `self::box` to catch and ignore the potential error so that it never leaks outside this class.
- Loading branch information