$this->user = json_decode($result); 在php7.4是正常的,php8.2就报错这个错误:Cannot assign stdClass to property app\api\controller\v1\Base::$user
不支持对象类型隐式转换。 你可以序列化再反序列化曲线救国。 例如之前在PHP5.6的时代经常能看见这样的代码json_decode(json_encode($data),true);
json_decode(json_encode($data),true);
不支持对象类型隐式转换。
你可以序列化再反序列化曲线救国。
例如之前在PHP5.6的时代经常能看见这样的代码
json_decode(json_encode($data),true);