Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit d347a8f

Browse files
committed
Use empty() instead of ! to test for empty string
More accurate semantics (testing for an empty string)
1 parent 52a5d82 commit d347a8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ProblemDetailsMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function process(ServerRequestInterface $request, DelegateInterface $dele
5555
private function canActAsErrorHandler(ServerRequestInterface $request) : bool
5656
{
5757
$accept = $request->getHeaderLine('Accept') ?: '*/*';
58-
if (! $accept) {
58+
if (empty($accept)) {
5959
return false;
6060
}
6161

0 commit comments

Comments
 (0)