Skip to content

Commit 8fc60b1

Browse files
authored
Update ResponseTrait.php
1 parent 7abedeb commit 8fc60b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Traits/ResponseTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function paginate(\Illuminate\Pagination\LengthAwarePaginator $paginate,
6464
public function success($data = [], $err_msg = 'success', $err_code = 200, $headers = [])
6565
{
6666
if (is_string($data)) {
67-
$err_code = is_string($err_msg) ?: $err_msg;
67+
$err_code = is_string($err_msg) ? $err_code : $err_msg;
6868
$err_msg = $data;
6969
$data = [];
7070
}

0 commit comments

Comments
 (0)