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'
Browse files Browse the repository at this point in the history
Close #180
Fixes #170
Fixes #176
  • Loading branch information
weierophinney committed Jul 19, 2017
2 parents 268a704 + a56abf9 commit 8a34a5a
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 @@ -18,7 +18,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 8a34a5a

Please sign in to comment.