Home > PHP Framework > ThinkPHP > Solve the error when tp5 encounters Call to a member function toArray() on array

Solve the error when tp5 encounters Call to a member function toArray() on array

藏色散人
Release: 2021-01-15 09:24:27
forward
10919 people have browsed it

The following tutorial column will introduce to you how to solve the error report when tp5 encounters Call to a member function toArray() on array. I hope it will be helpful to friends who need it. !

When I was writing code, I encountered another error message about Call to a member function toArray() on array, but it still didn’t work. I will change it and write a blog to record it.

When corrected,

// 数据集返回类型
    'resultset_type'  => 'array',
Copy after login

in application\database.php was changed to Solve the error when tp5 encounters Call to a member function toArray() on array
// 数据集返回类型
    'resultset_type'  => 'collection',
这样就可以啦
Copy after login

The above is the detailed content of Solve the error when tp5 encounters Call to a member function toArray() on array. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
tp5
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template