mirror of
https://github.com/php/php-src.git
synced 2026-04-21 15:08:16 +02:00
816b4c1235
If `ctime` or `asctime` return `NULL`, we must not attempt to copy the buffer, but rather return `NULL` as well.
17 lines
373 B
PHP
17 lines
373 B
PHP
--TEST--
|
|
Bug #79756 (finfo_file crash (FILEINFO_MIME))
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('fileinfo')) die('skip fileinfo extension not available');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$filename = __DIR__ . '/bug79756.xls';
|
|
$finfo = finfo_open(FILEINFO_MIME);
|
|
$mime = finfo_file($finfo, $filename);
|
|
finfo_close($finfo);
|
|
echo $mime;
|
|
?>
|
|
--EXPECT--
|
|
application/vnd.ms-excel; charset=binary
|