View Issue Details

IDProjectCategoryView StatusLast Update
0023775mantisbtattachmentspublic2018-02-06 21:17
Reportervboctor Assigned Tovboctor  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version2.10.0 
Target Version2.11.0Fixed in Version2.11.0 
Summary0023775: Remove obsolete code that checks if PHP file info API is defined
Description

The min supported PHP version now has this API defined.

TagsNo tags attached.

Activities

vboctor

vboctor

2018-01-03 15:41

manager   ~0058464

PR: https://github.com/mantisbt/mantisbt/pull/1263

atrol

atrol

2018-01-03 16:04

developer   ~0058469

@vboctor isn't this fixed in version 2.9.0 0023639 ?
https://github.com/mantisbt/mantisbt/commit/5f6292fbabea4de238cb10cb28e3449f71fa8679

vboctor

vboctor

2018-01-05 17:39

manager   ~0058485

@atrol You partially addressed finfo, but I did more. I think there is also more cleanup to be done here. For example, utility.php has finfo_get_if_available, where finfo is always available, I added methods to get mime type in file_api that we probably should use instead of using finfo_get_if_available, etc.

atrol

atrol

2018-01-05 18:42

developer   ~0058489

I think there is also more cleanup to be done here.

Right

To reduce redundant code, wouldn't it be better to give function finfo_get_if_available a better name (remove _if_available) and use it in your new functions file_get_mime_type and file_get_mime_type_for_content (bad name btw)?

Will also add comments for this in PR.