Skip to content

Commit

Permalink
refactor: replace empty()
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Dec 21, 2023
1 parent 2fb572d commit 2f19793
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/Test/FeatureTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ protected function setRequestBody($request, ?array $params = null)
$formatMime = 'application/xml';
}

if ($formatMime !== '' && ! empty($params)) {
if ($formatMime !== '' && ! ($params === null || $params === [])) {
$formatted = Services::format()->getFormatter($formatMime)->format($params);
$request->setBody($formatted);
$request->setHeader('Content-Type', $formatMime);
Expand Down

0 comments on commit 2f19793

Please sign in to comment.