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

藏色散人
藏色散人forward
2021-01-14 17:06:2710952browse

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',

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

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!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete