报错解决Argument 1 passed to model::get***() must be an instance of Entity_hotel, instance
2014-03-21 18:46
423 查看
报错如下:
<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>
参数一,与引用的声名的实体变量不一致
把类型声明去掉,解决。
相关文章推荐
- EJB3 Exception:identifier of an instance of net.model.entity.Role was altered from 2 to 0
- thinkphp5错误:类型错误: Argument 1 passed to think\Hook::import() must be of the type array
- EJB3 Exception:identifier of an instance of net.model.entity.Role was altered from 2 to 0
- When using SqlDependency without providing an options value, SqlDependency.Start() must be called prior to execution of a command added to the SqlDependency instance.
- must be an instance of com.sun错误的解决
- must be an instance of com.sun错误的解决
- 消息: Sys.ArgumentOutOfRangeException: Value must be an integer
- No enclosing instance of type FactoryModel is accessible. Must qualify the allocation with an enclos
- vs数据库访问出现Object reference not set to an instance of an object. 错误解决办法
- (Entlib 5.0)Activation error occured while trying to get instance of type ICacheManager, key ""求解决办法
- VS2005 solution文件打开时弹出“object reference not set to an instance of an object”错误的解决方法
- Sys.ArgumentOutOfRangeException: Value must be an integer 错误的原因
- mm_The type of the expression must be an array type but it resolved to List
- Oracle sql developer Unable to create an instance of the Java Virtu... 解决方法
- identifier of an instance of com.you.hibernate.model.TStudentInfo was altered from 6 to 7
- 我遇到的Object reference not set to an instance of an object.错误的解决办法
- TypeError: name must be an instance of basestring
- keil(MDK)中出现error: #513: a value of type "int" cannot be assigned to an entity of type "char *",即函数返回值无法赋值给对应变量的错误
- 解决调用context.Session["NAME"]时总出现Object reference not set to an instance of an object.异常的方法
- Server was unable to process request. ---> Object reference not set to an instance of an object解决