Skip to content

Commit

Permalink
Merge pull request #788 from hkiciy/fix-deprecated
Browse files Browse the repository at this point in the history
Accessing string offsets using curly braces has been deprecated in PHP 7.4.
  • Loading branch information
abraham committed Nov 29, 2019
2 parents f3f32be + 7f4c3e6 commit 534e2d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SignatureMethod.php
Expand Up @@ -58,7 +58,7 @@ public function checkSignature(Request $request, Consumer $consumer, Token $toke
// Avoid a timing leak with a (hopefully) time insensitive compare
$result = 0;
for ($i = 0; $i < strlen($signature); $i++) {
$result |= ord($built{$i}) ^ ord($signature{$i});
$result |= ord($built[$i]) ^ ord($signature[$i]);
}

return $result == 0;
Expand Down

0 comments on commit 534e2d0

Please sign in to comment.