Skip to content

Commit

Permalink
Fix atk4 backtrace highlight in exception render (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek authored Feb 12, 2024
1 parent 48a86cf commit eb71cd8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Run
uses: release-drafter/release-drafter@v5
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Setup cache 2/2
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-smoke-${{ matrix.php }}-${{ matrix.type }}-${{ hashFiles('composer.json') }}
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Setup cache 2/2
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.type }}-${{ hashFiles('composer.json') }}
Expand Down
2 changes: 1 addition & 1 deletion src/ExceptionRenderer/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected function processStackTraceInternal(): void
$call = $this->parseStackTraceFrame($call);
$escapeFrame = false;
if ($inAtk && !preg_match('~atk4[/\\\\][^/\\\\]+[/\\\\]src[/\\\\]~', $call['file'])) {
if ($inAtk && $call['file'] !== '' && !preg_match('~atk4[/\\\\][^/\\\\]+[/\\\\]src[/\\\\]~', $call['file'])) {
$escapeFrame = true;
$inAtk = false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ExceptionRenderer/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected function processStackTraceInternal(): void
$call = $this->parseStackTraceFrame($call);

$escapeFrame = false;
if ($inAtk && !preg_match('~atk4[/\\\\][^/\\\\]+[/\\\\]src[/\\\\]~', $call['file'])) {
if ($inAtk && $call['file'] !== '' && !preg_match('~atk4[/\\\\][^/\\\\]+[/\\\\]src[/\\\\]~', $call['file'])) {
$escapeFrame = true;
$inAtk = false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ExceptionRenderer/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected function processStackTraceInternal(): void
$call = $this->parseStackTraceFrame($call);

$escapeFrame = false;
if ($inAtk && !preg_match('~atk4[/\\\\][^/\\\\]+[/\\\\]src[/\\\\]~', $call['file'])) {
if ($inAtk && $call['file'] !== '' && !preg_match('~atk4[/\\\\][^/\\\\]+[/\\\\]src[/\\\\]~', $call['file'])) {
$escapeFrame = true;
$inAtk = false;
}
Expand Down

0 comments on commit eb71cd8

Please sign in to comment.