Skip to content

Commit

Permalink
fix: php >=7.4 Deprecated (#284)
Browse files Browse the repository at this point in the history
PHP Deprecated:  Invalid characters passed for attempted conversion, these have been ignored
  • Loading branch information
moniang authored Sep 24, 2021
1 parent de34227 commit dbacbda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions php/src/Kernel/Util/AntCertificationUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function hex2dec($hex)
{
$dec = 0;
$len = strlen($hex);
for ($i = 1; $i <= $len; $i++) {
for ($i = (false === strpos(strtolower($hex), '0x') ? 1 : 3); $i <= $len; $i++) {
$dec = bcadd($dec, bcmul(strval(hexdec($hex[$i - 1])), bcpow('16', strval($len - $i))));
}
return $dec;
Expand Down Expand Up @@ -609,4 +609,4 @@ function stripSignerAsn($der = null)
}
return substr($der, 4, $len + 4);
}
}
}

0 comments on commit dbacbda

Please sign in to comment.