Bug #71615 [Opn->Fbk]: Some file perform finfo_file will appear notice Array to string conversion

From: Date: Tue, 23 Feb 2016 12:40:26 +0000
Subject: Bug #71615 [Opn->Fbk]: Some file perform finfo_file will appear notice Array to string conversion
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199417@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71615&edit=1

 ID:                 71615
 Updated by:         cmb@php.net
 Reported by:        janpoem at gmail dot com
 Summary:            Some file perform finfo_file will appear notice
                     Array to string conversion
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            Unknown/Other Function
 Operating System:   Windows 10
 PHP Version:        7.0.3
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

Actually, I can't reproduce the behavior on Win 7 with a variation of the supplied test script.


Previous Comments:
------------------------------------------------------------------------
[2016-02-17 09:05:56] janpoem at gmail dot com

Description:
------------
Some files will appear Notice "Array to string conversion" when executing the function
"finfo_file". But the file is real and the path is absolute path. 



Test script:
---------------
<?php

$finfo = finfo_open(FILEINFO_MIME);

$files = [
	__FILE__, // ok
	'array_object.php', // ok
	'C:/Windows/system.ini', // ok
	'D:\\htdocs\\jquery\\README.md', // this will appear notice "Array to string
conversion"
];

foreach ($files as $file) {
	var_dump(finfo_file($finfo, $file));
}

finfo_close($finfo);



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=71615&edit=1


Thread (6 messages)

« previous php.bugs (#199417) next »