部署了一个php云函数,运行时候出现TimerWarning: count(): Parameter must be an array or an object that implements Countable in /xxx/xxx.php on line 71
错误
原71行代码for ($j = 0; $j < count($songlist["privileges"]); $j++) {
这里的count()
参数本来就是js数组啊,没得办法,给加了个(array)
变成了for ($j = 0; $j < count((array)$songlist["privileges"]); $j++) {
再跑一下,没事了
COMMENTS | NOTHING