Merge branch 'MDL-63967' of git://github.com/stronk7/moodle

This commit is contained in:
Jun Pataleta 2019-02-06 16:59:16 +08:00
commit d264253bd4
4 changed files with 17 additions and 3 deletions

View file

@ -21,4 +21,11 @@ UPGRADING.md
composer.json
get_oauth_token.php
phpdoc.dist.xml
travis.phpunit.xml.dist
travis.phpunit.xml.dist
Local changes (to verify/apply with new imports):
- MDL-63967: PHP 7.3 compatibility.
lib/phpmailer/src/PHPMailer.php: FILTER_FLAG_HOST_REQUIRED is deprecated and
implied with FILTER_VALIDATE_URL. This was fixed upstream by
https://github.com/PHPMailer/PHPMailer/pull/1551

View file

@ -3578,7 +3578,7 @@ class PHPMailer
//Is it a valid IPv4 address?
return (bool) filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
}
if (filter_var('http://' . $host, FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED)) {
if (filter_var('http://' . $host, FILTER_VALIDATE_URL)) {
//Is it a syntactically valid hostname?
return true;
}

View file

@ -1527,7 +1527,7 @@ final class t3lib_div {
require_once(PATH_typo3 . 'contrib/idna/idna_convert.class.php');
$IDN = new idna_convert(array('idn_version' => 2008));
return (filter_var($IDN->encode($url), FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) !== FALSE);
return (filter_var($IDN->encode($url), FILTER_VALIDATE_URL) !== FALSE);
}

View file

@ -8,4 +8,11 @@ Procedure:
2/ copy csconvtbl/*, unidata/* and all other necessary files we use
3/ run our phpunit tests with and without mbstring PHP extension
Local changes (to verify/apply with new imports):
- MDL-63967: PHP 7.3 compatibility.
lib/typo3/class.t3lib_div.php: FILTER_FLAG_SCHEME_REQUIRED is deprecated and
implied with FILTER_VALIDATE_URL. This is fixed upstream since Typo 6, with
the file class now under \TYPO3\CMS\Core\Utility\GeneralUtility.
skodak, stronk7, moodler