'HttpEnd' => [\app\listener\http\HttpEndListener::class], //HTTP請(qǐng)求結(jié)束回調(diào)事件
微信支付回調(diào)在這里報(bào)錯(cuò)了,報(bào)錯(cuò)原因:Cannot use object of type Symfony\Component\HttpFoundation\Response as array
我Log::error打印 $response->getData()格式如下:
我想取 statusCode的值怎么取啊,我用了
json_decode($response->getData(),true); 返回 空
json_decode($response->getData()); 返回 空
json_encode($response->getData()); 返回 {"headers":{}}
$response->getData()->statusCode; 返回報(bào)錯(cuò)
請(qǐng)?jiān)徫覍W(xué)藝不精,但是我不想再這看到報(bào)錯(cuò)了,這個(gè) statusCode取值,php怎么寫法?