Skip to content

Commit 220e1e5

Browse files
committed
Deprecation fix: ord(): Providing a string that is not one byte long is deprecated. Use ord([0]) instead
1 parent 92e7cfe commit 220e1e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Key/PublicKey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ protected static function makeASN1Segment(int $type, string $string): ?string
6565
{
6666
switch ($type) {
6767
case self::ASN1_TYPE_INTEGER:
68-
if (ord($string) > self::ASN1_SIZE_128 - 1) {
68+
if (ord($string[0]) > self::ASN1_SIZE_128 - 1) {
6969
$string = chr(0) . $string;
7070
}
7171
break;

0 commit comments

Comments
 (0)