Skip to content

Commit 9a77d28

Browse files
committed
fix: type error
PHP Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated
1 parent 73fe7fa commit 9a77d28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/API/ResponseTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ protected function format($data = null)
358358
*/
359359
protected function setResponseFormat(?string $format = null)
360360
{
361-
$this->format = strtolower($format);
361+
$this->format = ($format === null) ? null : strtolower($format);
362362

363363
return $this;
364364
}

0 commit comments

Comments
 (0)