Skip to content

Commit

Permalink
Isset covers empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Hlavtox authored Dec 30, 2023
1 parent 664f479 commit c202521
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/Admin/CustomerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function searchCustomers(Request $request): Response
$requestBodyContent = json_decode($request->getContent(), true);
$phrase = $requestBodyContent['phrase'];

if (!isset($phrase) && empty($phrase)) {
if (empty($phrase)) {
return $this->json(['message' => 'Property phrase is missing or empty.'], Response::HTTP_BAD_REQUEST);
}

Expand Down

0 comments on commit c202521

Please sign in to comment.