8000 tempnam, suppress notice to support streams by juliangut · Pull Request #739 · PHP-DI/PHP-DI · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tempnam, suppress notice to support streams #739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers an 8000 d 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

Merged
merged 1 commit into from
Oct 1, 2020

Conversation

juliangut
Copy link
Contributor

From the PHP manual on tempnam function:

Note: If PHP cannot create a file in the specified dir parameter, it falls back on the system default.

When using custom streams as compilation paths, such as using vfsStream for testing purposes, tempnam will resort to default system temp dir and will raise a the notice:

tempnam(): file created in the system's temporary directory

This was introduced in PHP 7.1.0, more information of this can be found here: https://www.php.net/manual/en/function.tempnam.php#97086

The fix simply silences the notice because temp file creation is checked right below

@mnapoli mnapoli added the bug label Oct 1, 2020
@mnapoli
Copy link
Member
mnapoli commented Oct 1, 2020

Thanks!

@mnapoli mnapoli merged commit 96a9ddb into PHP-DI:master Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0