Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Velluppillai <justin@innocraft.com>2022-03-09 00:03:18 +0300
committerGitHub <noreply@github.com>2022-03-09 00:03:18 +0300
commit7255b44b89f9c73b4d39a492902f4c56739fbc99 (patch)
tree0a790d97af2ddb8898e8b00ea75bb96df590a4f7 /core/Url.php
parent680db1156be27769709bf9a6e7f67636e7cfb8dc (diff)
Merge RC patches back to main branch (#18901)
* Update version to 4.8.0-rc1 * Fix possible warning in Url::isValidHost (#18887) * Handle case only file name updates on case insensitive file systems (#18865) * Added unit test for case-sensitive unlink * Use case-insensitive comparison in directoryDiff() if a case-insensitive filesystem is detected * Fix misleading method name * Update tests/PHPUnit/Unit/FilesystemTest.php Co-authored-by: Justin Velluppillai <justin@innocraft.com> * Update tests/PHPUnit/Unit/FilesystemTest.php Co-authored-by: Justin Velluppillai <justin@innocraft.com> Co-authored-by: Justin Velluppillai <justin@innocraft.com> * Update version to 4.8.0 (#18893) Co-authored-by: Stefan Giehl <stefan@matomo.org> Co-authored-by: Ben Burgess <88810029+bx80@users.noreply.github.com>
Diffstat (limited to 'core/Url.php')
-rw-r--r--core/Url.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/Url.php b/core/Url.php
index a79fdecb5b..c027538cdb 100644
--- a/core/Url.php
+++ b/core/Url.php
@@ -206,7 +206,7 @@ class Url
* value from the request.
* @return bool `true` if valid; `false` otherwise.
*/
- public static function isValidHost($host = false)
+ public static function isValidHost($host = false): bool
{
// only do trusted host check if it's enabled
if (isset(Config::getInstance()->General['enable_trusted_host_check'])
@@ -215,7 +215,7 @@ class Url
return true;
}
- if ($host === false) {
+ if (false === $host || null === $host) {
$host = self::getHostFromServerVariable();
if (empty($host)) {
// if no current host, assume valid