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

Commit 1eab945

Browse files
committed
Merge branch 'hotfix/272'
Close #272
2 parents a37e00a + 7aae485 commit 1eab945

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ All notable changes to this project will be documented in this file, in reverse
2222

2323
### Fixed
2424

25-
- Nothing.
25+
- [#272](https://github.com/zendframework/zend-validator/pull/272) changes
26+
curly braces in array and string offset access to square brackets
27+
in order to prevent issues under the upcoming PHP 7.4 release.
2628

2729
## 2.12.0 - 2019-01-30
2830

src/Isbn/Isbn10.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ private function sum($value)
3232
$sum = 0;
3333

3434
for ($i = 0; $i < 9; $i++) {
35-
$sum += (10 - $i) * $value{$i};
35+
$sum += (10 - $i) * $value[$i];
3636
}
3737

3838
return $sum;

src/Isbn/Isbn13.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ private function sum($value)
3333

3434
for ($i = 0; $i < 12; $i++) {
3535
if ($i % 2 == 0) {
36-
$sum += $value{$i};
36+
$sum += $value[$i];
3737
continue;
3838
}
3939

40-
$sum += 3 * $value{$i};
40+
$sum += 3 * $value[$i];
4141
}
4242

4343
return $sum;

0 commit comments

Comments
 (0)