10000 Address https://github.com/symfony/symfony/pull/47483#discussion_r997… · MatTheCat/symfony@bb4db68 · GitHub
[go: up one dir, main page]

Skip to content

Commit bb4db68

Browse files
committed
1 parent 83bae94 commit bb4db68

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/HttpKernel/Log/Logger.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function log($level, $message, array $context = []): void
114114
public function getLogs(Request $request = null): array
115115
{
116116
if ($request) {
117-
return $this->logs[spl_object_hash($request)] ?? [];
117+
return $this->logs[spl_object_id($request)] ?? [];
118118
}
119119

120120
return array_merge(...array_values($this->logs));
@@ -123,7 +123,7 @@ public function getLogs(Request $request = null): array
123123
public function countErrors(Request $request = null): int
124124
{
125125
if ($request) {
126-
return $this->errorCount[spl_object_hash($request)] ?? 0;
126+
return $this->errorCount[spl_object_id($request)] ?? 0;
127127
}
128128

129129
return array_sum($this->errorCount);
@@ -165,7 +165,7 @@ private function format(string $level, string $message, array $context, bool $pr
165165
private function record($level, $message, array $context): void
166166
{
167167
$request = $this->requestStack->getCurrentRequest();
168-
$hash = $request ? spl_object_hash($request) : '';
168+
$hash = $request ? spl_object_id($request) : '';
169169

170170
$this->logs[$hash][] = [
171171
'channel' => null,

0 commit comments

Comments
 (0)
0