Skip to content

Commit

Permalink
Merge branch 'MDL-67034' of https://github.com/stronk7/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
snake committed Nov 20, 2019
2 parents 364d927 + 20d4ecc commit bfd43d4
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/adodb/drivers/adodb-oci8po.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ final private function extractBinds($sql,$inputarr)
/*
* find the next character of the string
*/
$c = $sql{$i};
$c = $sql[$i];

if ($c == "'" && !$inString && $escaped==0)
/*
Expand Down
1 change: 1 addition & 0 deletions lib/adodb/readme_moodle.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ Our changes:
* Removed random seed initialization from lib/adodb/adodb.inc.php:216 (see 038f546 and MDL-41198).
* MDL-52286 Added muting erros in ADORecordSet::__destruct().
Check if fixed upstream during the next upgrade and remove this note. (8638b3f1441d4b928)
* MDL-67034 Fixes to make the library php74 compliant.

skodak, iarenaza, moodler, stronk7, abgreeve, lameze, ankitagarwal, marinaglancy
3 changes: 3 additions & 0 deletions lib/google/readme_moodle.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Here are the files that we have added.

This should not ever be used directly. The wrapper above uses it automatically.

Local changes (to reapply until upstream upgrades contain them):
* MDL-67034 php74 compliance fixes


Information
-----------
Expand Down
2 changes: 1 addition & 1 deletion lib/google/src/Google/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static function getStrLen($str)
$strlenVar = strlen($str);
$d = $ret = 0;
for ($count = 0; $count < $strlenVar; ++ $count) {
$ordinalValue = ord($str{$ret});
$ordinalValue = ord($str[$ret]);
switch (true) {
case (($ordinalValue >= 0x20) && ($ordinalValue <= 0x7F)):
// characters U-00000000 - U-0000007F (same as ASCII)
Expand Down
2 changes: 1 addition & 1 deletion lib/horde/framework/Horde/Crypt/Blowfish/Php/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ public function __construct($key)
for ($i = 0; $i < 18; ++$i) {
$data = 0;
for ($j = 4; $j > 0; --$j) {
$data = $data << 8 | ord($key{$k});
$data = $data << 8 | ord($key[$k]);
$k = ($k + 1) % $len;
}
$this->_P[$i] ^= $data;
Expand Down
3 changes: 2 additions & 1 deletion lib/horde/readme_moodle.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Description of import of Horde libraries
# Verify that these patches have been applied in the imported version. Apply them locally if not:
- https://github.com/horde/Mail/pull/1 (Mail component).
- https://github.com/horde/Imap_Client/pull/6 (IMAP Client component).
- https://github.com/horde/Crypt_Blowfish/pull/1 (PHP 7.4 compatibility, Crypt_Blowfish)

====
#!/bin/sh
Expand All @@ -38,4 +39,4 @@ do
then
cp -Rf $locale/* $target/locale
fi
done
done
4 changes: 4 additions & 0 deletions lib/ltiprovider/readme_moodle.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion lib/ltiprovider/src/OAuth/OAuthSignatureMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function check_signature($request, $consumer, $token, $signature) {
// 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 bfd43d4

Please sign in to comment.