Skip to content

Commit 79e8b19

Browse files
committed
Fix PHP7.2 bug
1 parent 7ce06e9 commit 79e8b19

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.github/workflows/functional-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
operating-system: [ubuntu-latest]
11-
php-versions: ['7.3', '7.4', '8.0']
11+
php-versions: ['7.2', '7.3', '7.4', '8.0']
1212
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
1313

1414
steps:

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
operating-system: [ ubuntu-latest ]
11-
php-versions: ['7.3', '7.4', '8.0']
11+
php-versions: ['7.2', '7.3', '7.4', '8.0']
1212
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
1313

1414
steps:

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ parameters:
1818
- '#Array .* does not accept object\.#'
1919
- '#Invalid type object to throw\.#'
2020
- '#Strict comparison using === between .* and .* will always evaluate to false\.#'
21+
- '#Binary operation "\^" between string and 1 results in an error\.#'
2122
includes:
2223
- vendor/phpstan/phpstan-strict-rules/rules.neon
2324
- vendor/phpstan/phpstan-phpunit/extension.neon

src/Ecc/Curve.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
use Brick\Math\BigInteger;
1717
use function is_null;
18-
use function ord;
1918
use RuntimeException;
2019

2120
/**
@@ -202,7 +201,7 @@ public function mul(Point $one, BigInteger $n): Point
202201
$n1 = str_pad(Math::baseConvert(Math::toString($n), 10, 2), $k, '0', STR_PAD_LEFT);
203202

204203
for ($i = 0; $i < $k; ++$i) {
205-
$j = ord($n1[$i]);
204+
$j = $n1[$i];
206205
Point::cswap($r[0], $r[1], $j ^ 1);
207206
$r[0] = $this->add($r[0], $r[1]);
208207
$r[1] = $this->getDouble($r[1]);

0 commit comments

Comments
 (0)