Skip to content

Commit

Permalink
fix: strpos returns false, if the needle was not found.
Browse files Browse the repository at this point in the history
  • Loading branch information
dextromethorphanum authored Jan 23, 2024
1 parent 7a23c01 commit d6a2c8d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Backtrace.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,7 @@ protected function isApplicationFrame(string $frameFilename): bool
$relativeFile = array_reverse(explode($this->applicationPath ?? '', $frameFilename, 2))[0];
}

if (strpos($relativeFile, DIRECTORY_SEPARATOR.'vendor') === 0) {
return false;
}

return true;
return (bool) strpos($relativeFile, DIRECTORY_SEPARATOR.'vendor');
}

protected function removeBacktracePackageFrames(array $frames): array
Expand Down

0 comments on commit d6a2c8d

Please sign in to comment.