diff --git a/src/Renderer/ErrorDetailsPageRenderer.php b/src/Renderer/ErrorDetailsPageRenderer.php
index 155e7ac..639508e 100644
--- a/src/Renderer/ErrorDetailsPageRenderer.php
+++ b/src/Renderer/ErrorDetailsPageRenderer.php
@@ -111,8 +111,8 @@ private function getTraceEntriesHtml(array $traceEntries): string
$traceContent .= ')
' .
- $this->html($entry['fileName']) .
- ':' . $this->html($entry['line']) . '
+ $this->html($entry['fileName']) . (!empty($entry['fileName']) ? ':' : '') .
+ '' . $this->html($entry['line']) . '
|
';
}
diff --git a/src/Renderer/JsonErrorRenderer.php b/src/Renderer/JsonErrorRenderer.php
index b40329e..b1e2974 100644
--- a/src/Renderer/JsonErrorRenderer.php
+++ b/src/Renderer/JsonErrorRenderer.php
@@ -60,7 +60,8 @@ private function getTraceEntriesJsonArray(array $traceEntries): array
$truncatedArgsString = implode(', ', $truncatedArgs);
$isNotVendor = $entry['nonVendorClass'] === 'non-vendor';
$traceJson[$key] = "#$key " . ($isNotVendor ? '(src) ' : '(vendor) ') . $entry['classAndFunction'] .
- '(' . $truncatedArgsString . ') called in (file)' . $entry['fileName'] . ':' . $entry['line'] . ']';
+ '(' . $truncatedArgsString . ')' .
+ (!empty($entry['fileName']) ? ' called in (file)' . $entry['fileName'] . ':' . $entry['line'] : '');
}
return $traceJson;