Skip to content

Commit 7ab5316

Browse files
committed
ensure strtolower() on host as current Zend\Uri 2.6.1 read host as is
1 parent fa1c7a4 commit 7ab5316

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

spec/Handler/LoggingSpec.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
beforeAll(function () {
2121
$this->logger = Double::instance(['extends' => Logger::class]);
2222
$this->request = new Request();
23+
$this->request->setUri('http://www.example.com');
2324
$this->errorHeroModuleLocalConfig = [
2425
'enable' => true,
2526
'display-settings' => [

src/Handler/Logging.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ private function collectErrorExceptionExtraData(array $collectedExceptionData, R
171171
} else {
172172
Assert::isInstanceOf($request, HttpRequest::class);
173173
$uri = $request->getUri();
174+
$uri->setHost(strtolower($uri->getHost()));
174175
$serverUrl = $uri->getScheme() . '://' . $uri->getHost();
175176
$url = $uri->toString();
176177
}

0 commit comments

Comments
 (0)