Homec4science

Use finfo_open() instead of new finfo()

Authored by vrana <jakubv@fb.com> on Feb 23 2012, 21:18.

Description

Use finfo_open() instead of new finfo()

Summary:
new finfo() always returns an object (and never null as opposed to comment).
But this object is unusable when there is an error.
I've also clarified PHP documentation:
http://svn.php.net/viewvc/phpdoc/en/trunk/reference/fileinfo/functions/finfo-open.xml?r1=323455&r2=323454

Test Plan:
Ran this part separately to be sure that it didn't fall back to other
attempts.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1677

Details

Committed
vrana <jakubv@fb.com>Feb 23 2012, 21:48
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUaef371f49f44: Minor, fix issue with arrays becoming sparse and failing when passed to…
Branches
Unknown
Tags
Unknown

Event Timeline

vrana <jakubv@fb.com> committed rPHUbdb2fd3f2eaf: Use finfo_open() instead of new finfo() (authored by vrana <jakubv@fb.com>).Feb 23 2012, 21:48