首页> 开发问题 >后端问题 后端问题
TP6报错致命错误: Cannot use object of type stdClass as array
作者:小萝卜 2022-11-02 【 TP6 】 浏览 877
简介今天在使用tp6时报错,致命错误: Cannot use object of type stdClass as array。我后端解析了一个josn数组,然后前端使用时报的这个错误
今天在使用tp6时报错,致命错误: Cannot use object of type stdClass as array。我后端解析了一个josn数组,然后前端使用时报的这个错误
代码是这样的:
$this_info = json_decode($data['payment_info']);
修改后:
$this_info = json_decode($data['payment_info'],true);
问题解决!
很赞哦! (0)
相关文章
- MySQL: unrecognized service错误解决办法
- 网站打不开错误提示:ERR_CONTENT_DECODING_FAILED
- [vs code] 运行go包提示:Code is already running!
- Site error: the ionCube PHP Loader needs to be installed.
- 使用mysql_list_tables()方法报错
- MYSQL5.7版本sql_mode=only_full_group_by报错解决方案
- 错误400-The request sent by the client was syntactically incorrect
- 语法解析错误: syntax error, unexpected 'unset' (T_UNSET)
- laravel通过composer安装报错了The 'https://repo.packagist.org/p/laravel/laravel.json' file could not be downloaded: failed to open stream
- windows下mysql中文乱码, 配置解决方法