Skip to content

Commit

Permalink
Replace serialize with json_encode to fix serialize reference count e…
Browse files Browse the repository at this point in the history
…rror
  • Loading branch information
Bartlomiej Ojrzenski committed Feb 15, 2017
1 parent 41819eb commit 9bf0204
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Logging/StackTraceLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function stopQuery()
$this->queries[$this->currentQuery] = array_merge($this->queries[$this->currentQuery], array(
'execution_time' => microtime(true) - $this->start,
'trace' => $trace,
'trace_hash' => md5(serialize($trace)),
'trace_hash' => md5(json_encode($trace)),
'sql_hash' => md5($sql),
'memory' => $memoryUsage - $this->memory
));
Expand Down Expand Up @@ -150,8 +150,8 @@ protected function createCachedQueryLog($stmt)
'execution_time' => 0,
'sql' => 'Cached query',
'trace' => $trace,
'trace_hash' => md5(serialize($trace)),
'sql_hash' => md5(serialize($trace)),
'trace_hash' => md5(json_encode($trace)),
'sql_hash' => md5(json_encode($trace)),
'memory' => $memoryUsage - $this->memory,
);
}
Expand Down

0 comments on commit 9bf0204

Please sign in to comment.