Skip to content

Commit

Permalink
add patch
Browse files Browse the repository at this point in the history
  • Loading branch information
ArrayIterator committed Mar 11, 2024
1 parent 57a9ba2 commit b9f2802
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/View/ErrorRenderer/HtmlTraceAbleErrorRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,13 @@ private function exceptionDetail(Throwable $exception): string
$countLine = 1;
$traceCount = 0;
$errorFile = Consolidation::protectMessage(
$exception->getFile(),
$this->rootDirectory
);
$message = Consolidation::protectMessage(
$exception->getMessage(),
$this->rootDirectory
);

for (; $countLine <= 5; $countLine++) {
if ($countLine === 5) {
$errorLineEditor .= "<span>$countLine</span>";
Expand All @@ -371,15 +374,15 @@ private function exceptionDetail(Throwable $exception): string
);
$mainErrorInfo .= sprintf(
"<div class='current'><strong>Message</strong>: <code>%s</code></div>\n",
htmlentities($exception->getMessage())
htmlentities($message)
);
$mainErrorInfo .= '<div><br></div>';

// tab
$tabNavigationTop = '<div class="trace-tab-nav active" data-id="0">';
$tabNavigationTop .= '<span class="trace-class">Error Details</span>';
$tabNavigationTop .= sprintf('<span class="trace-class">%s</span>', get_class($exception));
$tabNavigationTop .= sprintf('<span class="trace-file">%s</span>', htmlentities($exception->getMessage()));
$tabNavigationTop .= sprintf('<span class="trace-file">%s</span>', htmlentities($message));
$tabNavigationTop .= '</div>';

$exists = false;
Expand Down Expand Up @@ -412,7 +415,7 @@ private function exceptionDetail(Throwable $exception): string
? (realpath($configFile)?:null)
: null;
$definedConfig = defined('CONFIG_FILE') && is_string(CONFIG_FILE)
&& file_exists(CONFIG_FILE)
&& file_exists(CONFIG_FILE)
? realpath(CONFIG_FILE)?:null
: null;
$isCallstack = $exception instanceof MaximumCallstackExceeded
Expand Down

0 comments on commit b9f2802

Please sign in to comment.