报错解决Argument 1 passed to model::get***() must be an instance of Entity_hotel, instance

报错如下:


A PHP Error was encountered




Severity: 4096


Message:  Argument 1 passed to hotel_model::getNearHotel() must be an instance of Entity_hotel, instance of stdClass given, called in /mnt/***/****.zhuna.cn/application/models/service/recommended/import_zhuna_hotel_service.php on line 144 and defined


Filename: model/hotel_model.php


Line Number: 66




参数一,与引用的声名的实体变量不一致
把类型声明去掉,解决。

你可能感兴趣的:(PHP)