'HttpEnd' => [\app\listener\http\HttpEndListener::class], //HTTP請求結束回調事件
微信支付回調在這里報錯了,報錯原因: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; 返回報錯
請原諒我學藝不精,但是我不想再這看到報錯了,這個 statusCode取值,php怎么寫法?