Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/180' into develop
Browse files Browse the repository at this point in the history
Forward port #180
  • Loading branch information
weierophinney committed Jul 19, 2017
2 parents bf7be0d + a56abf9 commit f012441
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- Nothing.
- [#180](https://github.com/zendframework/zend-validator/pull/180) fixes how
`Zend\Validator\File\MimeType` "closes" the open FileInfo handle for the file
being validated, using `unset()` instead of `finfo_close()`; this resolves a
segfault that occurs on older PHP versions.

## 2.9.1 - 2017-05-17

Expand Down
2 changes: 1 addition & 1 deletion src/File/MimeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public function isValid($value, $file = null)
$this->type = null;
if (! empty($this->finfo)) {
$this->type = finfo_file($this->finfo, $file);
finfo_close($this->finfo);
unset($this->finfo);
}
}

Expand Down

0 comments on commit f012441

Please sign in to comment.