FatalThrowableError in index.php line 554:Type error: Argument 1 passed
来源:互联网 发布:华纳史诗冒险 知乎 编辑:程序博客网 时间:2024/06/04 01:13
错误描述:
FatalThrowableError in index.php line 554:Type error: Argument 1 passed to Illuminate\Database\Eloquent\Relations\index::save() must be an instance of Illuminate\Database\Eloquent\Model, instance of stdClass given, called in D:\xampp\htdocs\public_laravel_5.1\public_laravel_5.1\app\Role.php on line 18
错误分析:
造成这个的原因是由于方法中有类型限制,传入参数的时候参数的类型不对,对比以后发现是有一个类没有实例化 即没有new 这个类导致报此错误
解决方法:
new yourClass(); 或者检查你的方法中传入的参数是不是正确的
阅读全文
0 0
- FatalThrowableError in index.php line 554:Type error: Argument 1 passed
- Magento: Recoverable Error: Argument 1 passed to Mage_Core_Model_Store :: setWebsite() must be an in
- FatalThrowableError in Encrypter.php line 66: Call to undefined function openssl_encrypt()
- Recoverable Error: Argument 1 passed to Mage_SalesRule_Model_Validator::process()
- opencv Error:Bad argument <Unknown arrray type> in cvarrTomat
- ecshop Strict standards: Only variables should be passed by reference in flashplay.php on line 181
- thinkphp5错误:类型错误: Argument 1 passed to think\Hook::import() must be of the type array
- Warning: Invalid argument supplied for foreach() in /home/XXX/XXXX_html/category.php on line 100解决
- Error: template argument uses local type
- SpringMVC:Name for argument type ERROR
- An error occurred when merging assemblies: ILMerge.Merge: ERROR!!: Duplicate type 'index' found in a
- Phalcon错误:Argument 1 passed to Phalcon\Mvc\Model::validate()...
- MassAssignmentException in compiled.php line 10410:name
- swift error:Extra argument 'error' in call
- 为什么会出现Notice: Undefined index: submit in D:\xampp\htdocs\test.php on line 19
- Notice: Undefined index: submit in D:\.....php on line 2问题
- Notice: Undefined index: id in E:\wamp\wamp\www\liuyanbanban\modify.php on line 问题
- Undefined index: user in E:\wamp\wamp\www\liuyanbanban\login.php on line 4
- 一个简单的TCP/IP并发回显C/S(二)
- [置顶] 获取CListCtrl选中行行号的多种方法
- Echarts示例总结
- LinearLayout作用
- Storm配置项详解
- FatalThrowableError in index.php line 554:Type error: Argument 1 passed
- oracle 层次查询
- 问题集锦
- log4j.properties 的配置详解
- 一颗璀璨的月光宝石--Lua
- TreeSet判断重复元素
- 监听ajax请求完成
- TensorFlow官方文档中文版-笔记(七)
- PTA C实验5 7-7 计算天数