MDL-67034 lti_provider: php74 fix (curly braces) for LTI Provider lib

This commit is contained in:
Eloy Lafuente (stronk7) 2019-10-27 00:25:54 +02:00
parent b69028e626
commit 20d4ecc409
2 changed files with 5 additions and 1 deletions

View file

@ -13,6 +13,10 @@ These changes can be reverted once the following pull requests have been integra
* https://github.com/IMSGlobal/LTI-Tool-Provider-Library-PHP/pull/47 * https://github.com/IMSGlobal/LTI-Tool-Provider-Library-PHP/pull/47
* https://github.com/IMSGlobal/LTI-Tool-Provider-Library-PHP/pull/48 * https://github.com/IMSGlobal/LTI-Tool-Provider-Library-PHP/pull/48
This local changes can be reverted once it's checked that they are present upstream (note the
LTI-Tool-Provider-Library-PHP repo has been archived so it doesn't accept pull requests anymore):
* MDL-67034 php74 compliance fixes
It is recommended by upstream to install depdencies via composer - but the composer installation is bundled It is recommended by upstream to install depdencies via composer - but the composer installation is bundled
with an autoloader so it's better to do it manually. with an autoloader so it's better to do it manually.

View file

@ -56,7 +56,7 @@ abstract class OAuthSignatureMethod {
// Avoid a timing leak with a (hopefully) time insensitive compare // Avoid a timing leak with a (hopefully) time insensitive compare
$result = 0; $result = 0;
for ($i = 0; $i < strlen($signature); $i++) { for ($i = 0; $i < strlen($signature); $i++) {
$result |= ord($built{$i}) ^ ord($signature{$i}); $result |= ord($built[$i]) ^ ord($signature[$i]);
} }
return $result == 0; return $result == 0;