Skip to content

Commit e101da2

Browse files
committed
🐛 Fixing a bug.
1 parent 01b067e commit e101da2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

application/api/controller/Base.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected function response($msg = '', $data = [], $code = 200)
7676
$response = Response::create([
7777
'code' => $code,
7878
'msg' => $msg,
79-
'data' => $data,
79+
'data' => $data ?: new \stdClass(),
8080
'time' => time()
8181
], $this->format, 200);
8282

0 commit comments

Comments
 (0)