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

Commit99573dc

Browse files
committed
bug#23082 [MonologBridge] Do not silence errors in ServerLogHandler::formatRecord (lyrixx)
This PR was merged into the 3.3 branch.Discussion----------[MonologBridge] Do not silence errors in ServerLogHandler::formatRecord| Q | A| ------------- | ---| Branch? | 3.3| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -<!--- Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too).- Features and deprecations must be submitted against the 3.4, legacy code removals go to the master branch.- Please fill in this template according to the PR you're about to submit.- Replace this comment by a description of what your PR is solving.-->Commits-------f1edfa7 [MonologBridge] Do not silence errors in ServerLogHandler::formatRecord
2 parents1006959 +f1edfa7 commit99573dc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,15 @@ public function handle(array $record)
5151
if (!$this->socket =$this->socket ?:$this->createSocket()) {
5252
returnfalse ===$this->bubble;
5353
}
54+
}finally {
55+
restore_error_handler();
56+
}
5457

55-
$recordFormatted =$this->formatRecord($record);
58+
$recordFormatted =$this->formatRecord($record);
5659

60+
set_error_handler(self::class.'::nullErrorHandler');
61+
62+
try {
5763
if (-1 ===stream_socket_sendto($this->socket,$recordFormatted)) {
5864
stream_socket_shutdown($this->socket,STREAM_SHUT_RDWR);
5965

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp