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

From: Date: Sun, 06 Mar 2016 04:22:27 +0000
Subject: Bug #71615 [Fbk->NoF]: 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-199622@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:       php-bugs@lists.php.net
 Reported by:      janpoem at gmail dot com
 Summary:          Some file perform finfo_file will appear notice Array
                   to string conversion
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          Filesystem function related
 Operating System: Windows 10
 PHP Version:      7.0.3
 Private report:   N

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2016-02-25 08:53:55] laruence@php.net

please try with 7.0.4, as I fixed a similar bug #71434 before

------------------------------------------------------------------------
[2016-02-24 13:04:22] cmb@php.net

Thanks. Now I can reproduce the issue.

------------------------------------------------------------------------
[2016-02-24 07:20:22] janpoem at gmail dot com

I make a simple case. Please download the file as below.

http://git.oschina.net/kephp/kephp/raw/master/misc/issues/finfo_file_test.zip

In making these files, I found the this issue is triggered by the file content.

In the zip file, there is a file named "another.markdown" would throw out the notice, but
another file named "readme.md" was nothing happened.

It is really strange.

------------------------------------------------------------------------
[2016-02-23 12:40:23] cmb@php.net

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.

------------------------------------------------------------------------
[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 (#199622) next »