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

"Detect a .png file with PHP code" test fails intermittently #129

Open
danielbachhuber opened this issue Nov 14, 2017 · 2 comments
Open

Comments

@danielbachhuber
Copy link
Member

image

image

From #120

@danielbachhuber
Copy link
Member Author

@wp-cli/committers Any hypotheses on why this happens?

@schlessera
Copy link
Member

Some sources state that mime_content_type is actually deprecated, and we should try to use http://php.net/manual/en/function.finfo-file.php instead.

$finfo = finfo_open(FILEINFO_MIME_TYPE);
$mime_type = finfo_file($finfo, $filename);
finfo_close($finfo);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants