doctor-command icon indicating copy to clipboard operation
doctor-command copied to clipboard

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

Open danielbachhuber opened this issue 6 years ago • 2 comments

image

image

From #120

danielbachhuber avatar Nov 14 '17 15:11 danielbachhuber

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

danielbachhuber avatar Nov 14 '17 15:11 danielbachhuber

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);

schlessera avatar Nov 14 '17 15:11 schlessera