Open sunding0308 opened 6 years ago
/vendor/96qbhy/laravel-api-auth/src/Middleware.php:41 list($header, $payload, $alg) = $this->parseParams($header_string, $payload_string); 这里的返回值是个数组,并且数组的索引是 return compact('header', 'payload', 'alg');。 但是list()函数仅能用于数字索引的数组,并假定数字索引从 0 开始。 我将此行代码改为 list($header, $payload, $alg) = array_values($this->parseParams($header_string, $payload_string)); 就没问题了。不知是否正确,请解答。
list($header, $payload, $alg) = $this->parseParams($header_string, $payload_string);
return compact('header', 'payload', 'alg');
list($header, $payload, $alg) = array_values($this->parseParams($header_string, $payload_string));
赶紧把这个加上把。。。。还有人在吗
@daisanmu https://github.com/sunding0308/laravel-api-auth.git
不光是这个问题吧,api-token的过期时间貌似都没用上,可以加上过期时间校验的吧?????
/vendor/96qbhy/laravel-api-auth/src/Middleware.php:41
list($header, $payload, $alg) = $this->parseParams($header_string, $payload_string);
这里的返回值是个数组,并且数组的索引是return compact('header', 'payload', 'alg');
。 但是list()函数仅能用于数字索引的数组,并假定数字索引从 0 开始。 我将此行代码改为list($header, $payload, $alg) = array_values($this->parseParams($header_string, $payload_string));
就没问题了。不知是否正确,请解答。