Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit511e41a

Browse files
bug#18439 [Logging] Add support for Firefox (43+) in ChromePhpHandler (arjenm)
This PR was merged into the 2.3 branch.Discussion----------[Logging] Add support for Firefox (43+) in ChromePhpHandler| Q | A| ------------- | ---| Branch? | 2.3| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | none| License | MIT| Doc PR | noneFirefox added support for Chrome Logger a while back in [version 43](https://www.mozilla.org/en-US/firefox/43.0/releasenotes/).Support for Firefox was added in the ChromePHPHandler of [Monolog 1.18.0](Seldaek/monolog#721), although its not mentioned in the changelog.This PR is basically just to replace the originally copied regular expression, [with this new one](Seldaek/monolog@fa96f6a).There should be no BC breakage, even though users may be using Monolog versions between 1.11 and 1.18. Monolog's ChromePHPHandler only got minor touch ups and its protocol (and thus output) remained the same.This fix in fact also adds support for Firefox 43+ to older Monolog's when using the Symfony-version of that handler (which they should be using), since the Symfony-version of ChromePhpHandler completely overwrites the 'headersAccepted'-check of Monolog.Commits-------c8efc4d [Logging] Add support for firefox in ChromePhpHandler
2 parents5fbfcb0 +c8efc4d commit511e41a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/Symfony/Bridge/Monolog/Handler/ChromePhpHandler.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function onKernelResponse(FilterResponseEvent $event)
4242
return;
4343
}
4444

45-
if (!preg_match('{\bChrome/\d+[\.\d+]*\b}',$event->getRequest()->headers->get('User-Agent'))) {
45+
if (!preg_match('{\b(?:Chrome/\d+(?:\.\d+)*|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}',$event->getRequest()->headers->get('User-Agent'))) {
4646
$this->sendHeaders =false;
4747
$this->headers =array();
4848

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp