Skip to content

Commit 83c27c5

Browse files
committed
refactor: replace empty()
1 parent 671fe68 commit 83c27c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/Test/FeatureTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ protected function setRequestBody($request, ?array $params = null)
383383
$formatMime = 'application/xml';
384384
}
385385

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

0 commit comments

Comments
 (0)