Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Filesystem] Fix dumpFile stat failed error hitting custom handler #54878

Merged
merged 1 commit into from
May 16, 2024

Commits on May 10, 2024

  1. [Filesystem] Fix dumpFile stat failed error hitting custom handler

    Since symfony#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.
    acoulton committed May 10, 2024
    Configuration menu
    Copy the full SHA
    247182a View commit details
    Browse the repository at this point in the history