FatalThrowableError in index.php line 554:Type error: Argument 1 passed
錯誤描述:
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(); 或者檢查你的方法中傳入的引數是不是正確的
相關文章
- error: invalid type argument of unary ‘*‘ (have ‘int‘) *__first = __tmp;Error
- struts:實現圖片的上傳 argument type mismatch errorError
- error :does not name a typeError
- Solaris awk: syntax error near line 1 awk: bailing out near line 1ErrorAI
- error: 'cout' does not name a type|Error
- Error-Expected resource of typeError
- npm報錯 TypeError [ERR_INVALID_ARG_TYPE]: The “path“ argument must be of type string.Received undefineNPMError
- 解決一個小坑:error on line 1 at column 1: Document is emptyError
- Oracle 11G OCP 1Z0-053 554Oracle
- error: '[class name]' does not name a typeError
- error creating overlay mount to invalid argument unbuntu系統Error
- 通俗易懂解釋一類和二類錯誤(Type I Error Type II Error)Error
- error: ‘xxx’ does not name a typeError
- error: ‘變數名‘ does not name a type|Error變數
- error:dereferencing pointer to incomplete typeError
- CentOS8 AnolisOS8 yum安裝 No match for argument: htop ErrorCentOSError
- from v * ERROR at line 1: ORA-00942: table or view does not existErrorView
- PSQLexception: ERROR : type "signed" does not existSQLExceptionError
- python argument 1 must be 2-item sequence, not intPython
- Oracle OCP 1Z0 053 Q554(Backup Controlfile)Oracle
- 解決報錯 cuDNN error: CUDNN_STATUS_NOT_SUPPORTED. This error may appear if you passed in a non-contiguous input.DNNErrorAPP
- Postfix 554 5.7.1 Relay Access Denied
- error: "Invalid argument" setting key "net.ipv4.ip_local_port_range"Error
- _error-type_cout_不明確的符號Error符號
- Python基礎——positional argument vs keyword argumentPython
- python匯入資料錯誤:ParserError: Error tokenizing data. C error: Expected 1 fields in line 3, saw 2PythonError
- 【C進階】#error和#line使用分析Error
- line 10:syntax error: unexpected end of fileError
- com.badlogic.gdx.utils.SerializationException: Error parsing XML on line 1 nearExceptionErrorXML
- SAP MRKO Error - For document type RE, an entry is required in field Reference -ErrorUI
- ndk編譯錯誤:error: 'override' does not name a type編譯ErrorIDE
- 【已解決】TypeError: __init__() takes 1 positional argument but 2 were givenError
- [Symfony\Component\Debug\Exception\FatalThrowableError] Class 'LaravelLocalization' not foundExceptionErrorLaravel
- 隱藏index.phpIndexPHP
- SO API-- Receiving Error: VALIDATION FAILED FOR THE FIELD - ORDER TYPE?APIErrorAI
- nginx去掉index.php配置NginxIndexPHP
- Binary XML file line #2: Error inflatingXMLError
- Error running ‘Application’Command line is too longErrorAPP