-
Notifications
You must be signed in to change notification settings - Fork 7.9k
finfo::buffer(): Failed identify data 0:(null) #13344
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
Comments
I'm confused, why do you expect "something instead of What does this data represent and how should it determined? Anyway, this looks more like a feature request for the underling libmagic library: https://www.darwinsys.com/file/ or https://bugs.astron.com/my_view_page.php |
I don't know the file format. The issue is the warning with the message "null". Proposal 1: remove the warning, return false Proposal 2: keep the warning, change (null) to a default message Proposal 3: keep the warning, show an actual/useful message from the lib (only in this case, this ticket could be considered as a feature request for the lib). |
@Girgias It appears that the identification error without error code/message is just the bug of the library. |
Thanks for figuring out the upstream commit. |
Credits to ranvis for finding the upstream commit that fixes the issue. This backports file/file@029b824
* PHP-8.2: Fix GH-13344: finfo::buffer(): Failed identify data 0:(null)
* PHP-8.3: Fix GH-13344: finfo::buffer(): Failed identify data 0:(null)
Description
The following code:
Resulted in this output:
But I expected this output instead:
Something instead of '(null)'
PHP Version
PHP 8.3.2
Operating System
No response
The text was updated successfully, but these errors were encountered: