报错解决Argument 1 passed to model::get***() must be an instance of Entity_hotel, instance
报错如下:
<h4>A PHP Error was encountered</h4>
<p>Severity: 4096</p>
<p>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</p>
<p>Filename: model/hotel_model.php</p>
<p>Line Number: 66</p>
参数一,与引用的声名的实体变量不一致
把类型声明去掉,解决。
<h4>A PHP Error was encountered</h4>
<p>Severity: 4096</p>
<p>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</p>
<p>Filename: model/hotel_model.php</p>
<p>Line Number: 66</p>
参数一,与引用的声名的实体变量不一致
把类型声明去掉,解决。
声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。