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

This commit is contained in:
Eloy Lafuente (stronk7)
2019-11-19 10:03:12 +01:00
parent b69028e626
commit 20d4ecc409
2 changed files with 5 additions and 1 deletions
+4
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/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
with an autoloader so it's better to do it manually.
@@ -56,7 +56,7 @@ abstract class OAuthSignatureMethod {
// 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;