Description
In production, getException() returns null for security. However, setTrace() calls getException() internally, which breaks trace building in production environments.
Current State
// In AbstractHandler.php
public function getException(): ?Throwable {
if (!$this->security->allowRawExceptionAccess()) {
return null; // Returns null in production
}
return $this->exception;
}
private function setTrace(): void {
$ex = $this->getException(); // Gets null in production!
if ($ex === null) {
$this->traceArr = []; // Trace is empty in production
return;
}
// ... trace building never happens
}
Implementation Details
- Use private
$this->exception property directly in setTrace() instead of getException()
- Keep
getException() security behavior for public access only
Acceptance Criteria
Description
In production,
getException()returnsnullfor security. However,setTrace()callsgetException()internally, which breaks trace building in production environments.Current State
Implementation Details
$this->exceptionproperty directly insetTrace()instead ofgetException()getException()security behavior for public access onlyAcceptance Criteria
getException()method