diff --git a/system/API/ResponseTrait.php b/system/API/ResponseTrait.php index ece7effb0a96..ae2183e55ccc 100644 --- a/system/API/ResponseTrait.php +++ b/system/API/ResponseTrait.php @@ -358,7 +358,7 @@ protected function format($data = null) */ protected function setResponseFormat(?string $format = null) { - $this->format = strtolower($format); + $this->format = ($format === null) ? null : strtolower($format); return $this; }