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/11'
Browse files Browse the repository at this point in the history
Close #11
  • Loading branch information
weierophinney committed Jun 23, 2015
2 parents a1054be + c66777d commit 71bb805
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file, in reverse

### Added

- [#8](https://github.com/zendframework/zend-diactoros/pull/8) adds a "strict"
- [#8](https://github.com/zendframework/zend-validator/pull/8) adds a "strict"
configuration option; when enabled (the default), the length of the address is
checked to ensure it follows the specification.

Expand All @@ -20,6 +20,8 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- [#8](https://github.com/zendframework/zend-diactoros/pull/8) fixes bad
- [#8](https://github.com/zendframework/zend-validator/pull/8) fixes bad
behavior on the part of the `idn_to_utf8()` function, returning the original
address in the case that the function fails.
- [#11](https://github.com/zendframework/zend-validator/pull/11) fixes
`ValidatorChain::prependValidator()` so that it works on HHVM.
7 changes: 3 additions & 4 deletions src/ValidatorChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,9 @@ public function prependValidator(ValidatorInterface $validator, $breakChainOnFai
$priority = self::DEFAULT_PRIORITY;

if (!$this->validators->isEmpty()) {
$queue = $this->validators->getIterator();
$queue->setExtractFlags(PriorityQueue::EXTR_PRIORITY);
$extractedNode = $queue->extract();
$priority = $extractedNode[0] + 1;
$extractedNodes = $this->validators->toArray(PriorityQueue::EXTR_PRIORITY);
rsort($extractedNodes, SORT_NUMERIC);
$priority = $extractedNodes[0] + 1;
}

$this->validators->insert(
Expand Down

0 comments on commit 71bb805

Please sign in to comment.