Skip to content

Commit

Permalink
Revert type strictness regression
Browse files Browse the repository at this point in the history
PHP 7.0 doesn't support nullable types, so we can't type-hint this as ?int. If we declare it as int, users can't explicitly pass NULL.
  • Loading branch information
paragonie-security committed Jan 17, 2022
1 parent 74c5801 commit 9229e15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Binary.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static function safeStrlen(string $str): int
public static function safeSubstr(
string $str,
int $start = 0,
int $length = null
$length = null
): string {
if ($length === 0) {
return '';
Expand Down

0 comments on commit 9229e15

Please sign in to comment.