首页> 开发问题 >后端问题 后端问题
TP6报错致命错误: Cannot use object of type stdClass as array
作者:小萝卜 2022-11-02 【 TP6 】 浏览 1693
简介今天在使用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)
相关文章
- windows下mysql中文乱码, 配置解决方法
- MySQL: unrecognized service错误解决办法
- 语法解析错误: syntax error, unexpected 'unset' (T_UNSET)
- [vs code] 运行go包提示:Code is already running!
- Site error: the ionCube PHP Loader needs to be installed.
- tp3.2插入数据时SQLSTATE[HY000]: General error
- Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in
- PHP查询报错, Fatal error: Allowed memory size of 134217728 bytes exhausted
- 错误400-The request sent by the client was syntactically incorrect
- MYSQL5.7版本sql_mode=only_full_group_by报错解决方案