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

Skip to content

Commit 66982e0

Browse files
committed
1 parent bb4db68 commit 66982e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Bridge/Monolog/Processor/DebugProcessor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct(RequestStack $requestStack = null)
3333

3434
private function doInvoke(array|LogRecord $record): array| 8000 LogRecord
3535
{
36-
$hash = $this->requestStack && ($request = $this->requestStack->getCurrentRequest()) ? spl_object_hash($request) : '';
36+
$hash = $this->requestStack && ($request = $this->requestStack->getCurrentRequest()) ? spl_object_id($request) : '';
3737

3838
$timestamp = $timestampRfc3339 = false;
3939
if ($record['datetime'] instanceof \DateTimeInterface) {
@@ -71,7 +71,7 @@ private function doInvoke(array|LogRecord $record): array|LogRecord
7171
public function getLogs(Request $request = null): array
7272
{
7373
if (null !== $request) {
74-
return $this->records[spl_object_hash($request)] ?? [];
74+
return $this->records[spl_object_id($request)] ?? [];
7575
}
7676

7777
if (0 === \count($this->records)) {
@@ -84,7 +84,7 @@ public function getLogs(Request $request = null): array
8484
public function countErrors(Request $request = null): int
8585
{
8686
if (null !== $request) {
87-
return $this->errorCount[spl_object_hash($request)] ?? 0;
87+
return $this->errorCount[spl_object_id($request)] ?? 0;
8888
}
8989

9090
return array_sum($this->errorCount);

0 commit comments

Comments
 (0)
0