Skip to content

Commit c4b2616

Browse files
authored
Update WebmanResponseTrait.php
1 parent 89e7453 commit c4b2616

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Traits/WebmanResponseTrait.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 = $err_msg;
67+
$err_code = is_string($err_msg) ?: $err_msg;
6868
$err_msg = $data;
6969
$data = [];
7070
}

0 commit comments

Comments
 (0)