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

Commit cce94a3

Browse files
committed
Merge branch 'hotfix/123'
Close #123
2 parents 222022d + c0c6b30 commit cce94a3

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ All notable changes to this project will be documented in this file, in reverse
2222

2323
### Fixed
2424

25-
- Nothing.
25+
- [#123](https://github.com/zendframework/zend-session/pull/123) fixes a bug preventing two first hash functions from `hash_algos()`
26+
(usually `md2` and `md4`) from being used in `SessionConfig::setHashFunction`.
2627

2728
## 2.9.0 - 2019-09-20
2829

@@ -130,7 +131,7 @@ All notable changes to this project will be documented in this file, in reverse
130131
### Fixed
131132

132133
- [#108](https://github.com/zendframework/zend-session/pull/108) fixes a dependency
133-
conflict in `composer.json` which prevented `phpunit/phpunit` 6.5 or newer from
134+
conflict in `composer.json` which prevented `phpunit/phpunit` 6.5 or newer from
134135
being installed together with `zendframework/zend-session`.
135136

136137
## 2.8.4 - 2018-01-31

src/Config/SessionConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ protected function getHashFunctions()
360360
* "0" and "1" refer to MD5-128 and SHA1-160, respectively, and are
361361
* valid in addition to whatever is reported by hash_algos()
362362
*/
363-
$this->validHashFunctions = ['0', '1'] + hash_algos();
363+
$this->validHashFunctions = array_merge(['0', '1'], hash_algos());
364364
}
365365
return $this->validHashFunctions;
366366
}

test/Config/SessionConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ public function testUseTransSidAltersIniSetting()
720720

721721
public function hashFunctions()
722722
{
723-
$hashFunctions = [0, 1] + hash_algos();
723+
$hashFunctions = array_merge([0, 1], hash_algos());
724724
$provider = [];
725725
foreach ($hashFunctions as $function) {
726726
$provider[] = [$function];

test/Config/StandardConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ public function testUseTransSidIsMutable()
432432

433433
public function hashFunctions()
434434
{
435-
$hashFunctions = [0, 1] + hash_algos();
435+
$hashFunctions = array_merge([0, 1], hash_algos());
436436
$provider = [];
437437
foreach ($hashFunctions as $function) {
438438
$provider[] = [$function];

0 commit comments

Comments
 (0)