Skip to content

Commit

Permalink
Merge pull request #1 from lou-perret/master
Browse files Browse the repository at this point in the history
Fix deprecations on PHP 8.1
  • Loading branch information
bseddon authored Jan 10, 2023
2 parents bd4f449 + e70eff3 commit 2fde5f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Asn1/Der/Encoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,13 @@ protected function encodeType($typeID, $class, $isConstructed)
/**
* Encode the length of the encoded value of an element.
*
* @param string $encodedElementValue the encoded value of an element
* @param ?string $encodedElementValue the encoded value of an element
*
* @return string
*/
protected function encodeLength($encodedElementValue)
{
$length = strlen($encodedElementValue);
$length = $encodedElementValue === null ? 0 : strlen($encodedElementValue);
if ($length < 128) {
return chr($length);
}
Expand Down

0 comments on commit 2fde5f7

Please sign in to comment.