Skip to content

Commit

Permalink
Update acceptHtml method to check for 'text/html' instead of '/html'
Browse files Browse the repository at this point in the history
  • Loading branch information
lennartdohmann committed Nov 25, 2024
1 parent f856c7f commit 5bdd526
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/EventListener/FileEventsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function generateBody(Exception $ex): mixed {
private function acceptHtml(): bool {
foreach (explode(',', $this->request->getHeader('Accept')) as $part) {
$subparts = explode(';', $part);
if (str_ends_with($subparts[0], '/html')) {
if (str_ends_with($subparts[0], 'text/html')) {
return true;
}
}
Expand Down

1 comment on commit 5bdd526

@unglaublicherdude
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.