Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accepting Asset #2276

Closed
stevecookms opened this issue Jul 20, 2016 · 8 comments
Closed

Accepting Asset #2276

stevecookms opened this issue Jul 20, 2016 · 8 comments
Labels

Comments

@stevecookms
Copy link

I have created an Accessory and have checked the box to have the user confirm delivery.

I checked out the Accessory to a user and clicked the link in the email.

I am presented with a screen to "Accept or Reject", when I click "Accept", I get an error.

Here is the logs:

[2016-07-20 08:43:37] production.ERROR: exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'asset_id' cannot be null' in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php:441 Stack trace: #0 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(441): PDOStatement->execute(Array) #1 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(706): Illuminate\Database\Connection->Illuminate\Database{closure}(Object(Illuminate\Database\MySqlConnection), 'insert into as...', Array)
#2 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(669): Illuminate\Database\Connection->runQueryCallback('insert into as...', Array, Object(Closure)) #3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(442): Illuminate\Database\Connection->run('insert into as...', Array, Object(Closure))
#4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(398): Illuminate\Database\Connection->statement('insert into as...', Array) #5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\Database\Connection->insert('insert into as...', Array)
#6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2055): Illuminate\Database\Query\Processors\Processor->processInsertGetId(Object(Illuminate\Database\Query\Builder), 'insert into `as...', Array, 'id')
#7 [internal function]: Illuminate\Database\Query\Builder->insertGetId(Array, 'id')
#8 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1399): call_user_func_array(Array, Array)
#9 /var/www/snipeit/bootstrap/cache/compiled.php(10852): Illuminate\Database\Eloquent\Builder->__call('insertGetId', Array)
#10 /var/www/snipeit/bootstrap/cache/compiled.php(10852): Illuminate\Database\Eloquent\Builder->insertGetId(Array, 'id')
#11 /var/www/snipeit/bootstrap/cache/compiled.php(10841): Illuminate\Database\Eloquent\Model->insertAndSetId(Object(Illuminate\Database\Eloquent\Builder), Array)
#12 /var/www/snipeit/bootstrap/cache/compiled.php(10792): Illuminate\Database\Eloquent\Model->performInsert(Object(Illuminate\Database\Eloquent\Builder), Array)
#13 /var/www/snipeit/app/Models/Actionlog.php(120): Illuminate\Database\Eloquent\Model->save()
#14 /var/www/snipeit/app/Http/Controllers/ViewAssetsController.php(271): App\Models\Actionlog->logaction('accepted')
#15 [internal function]: App\Http\Controllers\ViewAssetsController->postAcceptAsset('12')
#16 /var/www/snipeit/bootstrap/cache/compiled.php(9419): call_user_func_array(Array, Array)
#17 /var/www/snipeit/bootstrap/cache/compiled.php(9481): Illuminate\Routing\Controller->callAction('postAcceptAsset', Array)
#18 /var/www/snipeit/bootstrap/cache/compiled.php(9461): Illuminate\Routing\ControllerDispatcher->call(Object(App\Http\Controllers\ViewAssetsController), Object(Illuminate\Routing\Route), 'postAcceptAsset')
#19 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#20 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#21 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#22 /var/www/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#23 /var/www/snipeit/bootstrap/cache/compiled.php(9462): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#24 /var/www/snipeit/bootstrap/cache/compiled.php(9449): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(App\Http\Controllers\ViewAssetsController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'postAcceptAsset')
#25 /var/www/snipeit/bootstrap/cache/compiled.php(8517): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'App\Http\Contro...', 'postAcceptAsset')
#26 /var/www/snipeit/bootstrap/cache/compiled.php(8504): Illuminate\Routing\Route->runController(Object(Illuminate\Http\Request))
#27 /var/www/snipeit/bootstrap/cache/compiled.php(8218): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#28 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#29 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#30 /var/www/snipeit/app/Http/Middleware/Authenticate.php(45): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#31 [internal function]: App\Http\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
#32 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#33 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#34 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#35 /var/www/snipeit/app/Http/Middleware/CheckLocale.php(40): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#36 [internal function]: App\Http\Middleware\CheckLocale->handle(Object(Illuminate\Http\Request), Object(Closure))
#37 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#38 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#39 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#40 /var/www/snipeit/bootstrap/cache/compiled.php(3225): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#41 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#42 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#43 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#44 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#45 /var/www/snipeit/bootstrap/cache/compiled.php(13139): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#46 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#47 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#48 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#49 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#50 /var/www/snipeit/bootstrap/cache/compiled.php(13076): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#51 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#52 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#53 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#54 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#55 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#56 /var/www/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#57 /var/www/snipeit/bootstrap/cache/compiled.php(8219): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#58 /var/www/snipeit/bootstrap/cache/compiled.php(8210): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#59 /var/www/snipeit/bootstrap/cache/compiled.php(8200): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#60 /var/www/snipeit/bootstrap/cache/compiled.php(2419): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#61 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request))
#62 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#63 /var/www/snipeit/vendor/fideloper/proxy/src/TrustProxies.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#64 [internal function]: Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#65 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#66 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#67 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#68 /var/www/snipeit/app/Http/Middleware/CheckForSetup.php(22): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#69 [internal function]: App\Http\Middleware\CheckForSetup->handle(Object(Illuminate\Http\Request), Object(Closure))
#70 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#71 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#72 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#73 /var/www/snipeit/app/Http/Middleware/NosniffGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#74 [internal function]: App\Http\Middleware\NosniffGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
#75 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#76 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#77 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#78 /var/www/snipeit/app/Http/Middleware/XssProtectHeader.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#79 [internal function]: App\Http\Middleware\XssProtectHeader->handle(Object(Illuminate\Http\Request), Object(Closure))
#80 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#81 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#82 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#83 /var/www/snipeit/app/Http/Middleware/FrameGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#84 [internal function]: App\Http\Middleware\FrameGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
#85 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#86 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#87 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#88 /var/www/snipeit/bootstrap/cache/compiled.php(13400): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#89 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#90 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#91 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#92 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#93 /var/www/snipeit/bootstrap/cache/compiled.php(11943): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#94 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#95 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#96 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#97 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#98 /var/www/snipeit/bootstrap/cache/compiled.php(3286): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#99 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#100 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#101 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#102 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#103 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#104 /var/www/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#105 /var/www/snipeit/bootstrap/cache/compiled.php(2366): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#106 /var/www/snipeit/bootstrap/cache/compiled.php(2350): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#107 /var/www/snipeit/public/index.php(55): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#108 {main}

Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'asset_id' cannot be null (SQL: insert into asset_logs (asset_id, component_id, accessory_id, asset_type, checkedout_to, note, user_id, accepted_at, action_type, updated_at, created_at) values (, , 2, accessory, 13, , 13, 2016-07-20 08:43:37, accepted, 2016-07-20 08:43:37, 2016-07-20 08:43:37))' in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php:713
Stack trace:
#0 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(669): Illuminate\Database\Connection->runQueryCallback('insert into as...', Array, Object(Closure)) #1 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(442): Illuminate\Database\Connection->run('insert into as...', Array, Object(Closure))
#2 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(398): Illuminate\Database\Connection->statement('insert into as...', Array) #3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\Database\Connection->insert('insert into as...', Array)
#4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2055): Illuminate\Database\Query\Processors\Processor->processInsertGetId(Object(Illuminate\Database\Query\Builder), 'insert into `as...', Array, 'id')
#5 [internal function]: Illuminate\Database\Query\Builder->insertGetId(Array, 'id')
#6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1399): call_user_func_array(Array, Array)
#7 /var/www/snipeit/bootstrap/cache/compiled.php(10852): Illuminate\Database\Eloquent\Builder->__call('insertGetId', Array)
#8 /var/www/snipeit/bootstrap/cache/compiled.php(10852): Illuminate\Database\Eloquent\Builder->insertGetId(Array, 'id')
#9 /var/www/snipeit/bootstrap/cache/compiled.php(10841): Illuminate\Database\Eloquent\Model->insertAndSetId(Object(Illuminate\Database\Eloquent\Builder), Array)
#10 /var/www/snipeit/bootstrap/cache/compiled.php(10792): Illuminate\Database\Eloquent\Model->performInsert(Object(Illuminate\Database\Eloquent\Builder), Array)
#11 /var/www/snipeit/app/Models/Actionlog.php(120): Illuminate\Database\Eloquent\Model->save()
#12 /var/www/snipeit/app/Http/Controllers/ViewAssetsController.php(271): App\Models\Actionlog->logaction('accepted')
#13 [internal function]: App\Http\Controllers\ViewAssetsController->postAcceptAsset('12')
#14 /var/www/snipeit/bootstrap/cache/compiled.php(9419): call_user_func_array(Array, Array)
#15 /var/www/snipeit/bootstrap/cache/compiled.php(9481): Illuminate\Routing\Controller->callAction('postAcceptAsset', Array)
#16 /var/www/snipeit/bootstrap/cache/compiled.php(9461): Illuminate\Routing\ControllerDispatcher->call(Object(App\Http\Controllers\ViewAssetsController), Object(Illuminate\Routing\Route), 'postAcceptAsset')
#17 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#18 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#19 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#20 /var/www/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#21 /var/www/snipeit/bootstrap/cache/compiled.php(9462): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#22 /var/www/snipeit/bootstrap/cache/compiled.php(9449): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(App\Http\Controllers\ViewAssetsController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'postAcceptAsset')
#23 /var/www/snipeit/bootstrap/cache/compiled.php(8517): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'App\Http\Contro...', 'postAcceptAsset')
#24 /var/www/snipeit/bootstrap/cache/compiled.php(8504): Illuminate\Routing\Route->runController(Object(Illuminate\Http\Request))
#25 /var/www/snipeit/bootstrap/cache/compiled.php(8218): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#26 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#27 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#28 /var/www/snipeit/app/Http/Middleware/Authenticate.php(45): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#29 [internal function]: App\Http\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
#30 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#31 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#32 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#33 /var/www/snipeit/app/Http/Middleware/CheckLocale.php(40): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#34 [internal function]: App\Http\Middleware\CheckLocale->handle(Object(Illuminate\Http\Request), Object(Closure))
#35 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#36 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#37 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#38 /var/www/snipeit/bootstrap/cache/compiled.php(3225): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#39 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#40 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#41 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#42 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#43 /var/www/snipeit/bootstrap/cache/compiled.php(13139): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#44 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#45 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#46 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#47 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#48 /var/www/snipeit/bootstrap/cache/compiled.php(13076): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#49 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#50 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#51 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#52 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#53 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#54 /var/www/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#55 /var/www/snipeit/bootstrap/cache/compiled.php(8219): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#56 /var/www/snipeit/bootstrap/cache/compiled.php(8210): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#57 /var/www/snipeit/bootstrap/cache/compiled.php(8200): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#58 /var/www/snipeit/bootstrap/cache/compiled.php(2419): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#59 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request))
#60 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#61 /var/www/snipeit/vendor/fideloper/proxy/src/TrustProxies.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#62 [internal function]: Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#63 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#64 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#65 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#66 /var/www/snipeit/app/Http/Middleware/CheckForSetup.php(22): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#67 [internal function]: App\Http\Middleware\CheckForSetup->handle(Object(Illuminate\Http\Request), Object(Closure))
#68 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#69 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#70 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#71 /var/www/snipeit/app/Http/Middleware/NosniffGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#72 [internal function]: App\Http\Middleware\NosniffGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
#73 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#74 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#75 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#76 /var/www/snipeit/app/Http/Middleware/XssProtectHeader.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#77 [internal function]: App\Http\Middleware\XssProtectHeader->handle(Object(Illuminate\Http\Request), Object(Closure))
#78 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#79 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#80 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#81 /var/www/snipeit/app/Http/Middleware/FrameGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#82 [internal function]: App\Http\Middleware\FrameGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
#83 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#84 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#85 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#86 /var/www/snipeit/bootstrap/cache/compiled.php(13400): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#87 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#88 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#89 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#90 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#91 /var/www/snipeit/bootstrap/cache/compiled.php(11943): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#92 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#93 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#94 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#95 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#96 /var/www/snipeit/bootstrap/cache/compiled.php(3286): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#97 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#98 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#99 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#100 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#101 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#102 /var/www/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#103 /var/www/snipeit/bootstrap/cache/compiled.php(2366): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#104 /var/www/snipeit/bootstrap/cache/compiled.php(2350): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#105 /var/www/snipeit/public/index.php(55): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#106 {main}

`

@dmeltzer
Copy link
Contributor

dmeltzer commented Jul 20, 2016

Can you try applying the following patch from your base snipe-it directory?

diff --git a/app/Http/Controllers/ViewAssetsController.php b/app/Http/Controllers/ViewAssetsController.php
index fd3710b..b26937c 100755
--- a/app/Http/Controllers/ViewAssetsController.php
+++ b/app/Http/Controllers/ViewAssetsController.php
@@ -225,7 +225,9 @@ class ViewAssetsController extends Controller
         // Asset
         if (($findlog->asset_id!='') && ($findlog->asset_type=='hardware')) {
             $logaction->asset_id = $findlog->asset_id;
-            $logaction->accessory_id = null;
+            $logaction->accessory_id = 0;
+            $logaction->consumable_id = 0;
+            $logaction->component_id = 0;
             $logaction->asset_type = 'hardware';

             if (Input::get('asset_acceptance')!='accepted') {
@@ -238,27 +240,29 @@ class ViewAssetsController extends Controller
         // software
         } elseif (($findlog->asset_id!='') && ($findlog->asset_type=='software')) {
             $logaction->asset_id = $findlog->asset_id;
-            $logaction->accessory_id = null;
-            $logaction->component_id = null;
+            $logaction->accessory_id = 0;
+            $logaction->component_id = 0;
+            $logaction->consumable_id = 0;
             $logaction->asset_type = 'software';

         // accessories
         } elseif ($findlog->accessory_id!='') {
-            $logaction->asset_id = null;
-            $logaction->component_id = null;
+            $logaction->asset_id = 0;
+            $logaction->component_id = 0;
             $logaction->accessory_id = $findlog->accessory_id;
+            $logaction->consumable_id = 0;
             $logaction->asset_type = 'accessory';
             // accessories
         } elseif ($findlog->consumable_id!='') {
-            $logaction->asset_id = null;
-            $logaction->accessory_id = null;
-            $logaction->component_id = null;
+            $logaction->asset_id = 0;
+            $logaction->accessory_id = 0;
+            $logaction->component_id = 0;
             $logaction->consumable_id = $findlog->consumable_id;
             $logaction->asset_type = 'consumable';
         } elseif ($findlog->component_id!='') {
-            $logaction->asset_id = null;
-            $logaction->accessory_id = null;
-            $logaction->consumable_id = null;
+            $logaction->asset_id = 0;
+            $logaction->accessory_id = 0;
+            $logaction->consumable_id = 0;
             $logaction->component_id = $findlog->component_id;
             $logaction->asset_type = 'component';
         }

@stevecookms
Copy link
Author

Is there any way you can just get me the new php file?

I am not familiar with GIT patches

@dmeltzer
Copy link
Contributor

Rename this to ViewAssetsController.php and put it in your app/Http/Controllers/ directory.
ViewAssetsController.txt

@stevecookms
Copy link
Author

Getting different error now..

[2016-07-20 10:16:52] production.ERROR: exception 'ErrorException' with message 'Creating default object from empty value' in /var/www/snipeit/app/Http/Controllers/ViewAssetsController.php:282 Stack trace: #0 /var/www/snipeit/app/Http/Controllers/ViewAssetsController.php(282): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Creating defaul...', '/var/www/snipei...', 282, Array) #1 [internal function]: App\Http\Controllers\ViewAssetsController->postAcceptAsset('20') #2 /var/www/snipeit/bootstrap/cache/compiled.php(9419): call_user_func_array(Array, Array) #3 /var/www/snipeit/bootstrap/cache/compiled.php(9481): Illuminate\Routing\Controller->callAction('postAcceptAsset', Array) #4 /var/www/snipeit/bootstrap/cache/compiled.php(9461): Illuminate\Routing\ControllerDispatcher->call(Object(App\Http\Controllers\ViewAssetsController), Object(Illuminate\Routing\Route), 'postAcceptAsset') #5 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #7 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #8 /var/www/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #9 /var/www/snipeit/bootstrap/cache/compiled.php(9462): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #10 /var/www/snipeit/bootstrap/cache/compiled.php(9449): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(App\Http\Controllers\ViewAssetsController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'postAcceptAsset') #11 /var/www/snipeit/bootstrap/cache/compiled.php(8517): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'App\Http\Contro...', 'postAcceptAsset') #12 /var/www/snipeit/bootstrap/cache/compiled.php(8504): Illuminate\Routing\Route->runController(Object(Illuminate\Http\Request)) #13 /var/www/snipeit/bootstrap/cache/compiled.php(8218): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request)) #14 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #15 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #16 /var/www/snipeit/app/Http/Middleware/Authenticate.php(45): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #17 [internal function]: App\Http\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure)) #18 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array) #19 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #20 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #21 /var/www/snipeit/app/Http/Middleware/CheckLocale.php(40): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #22 [internal function]: App\Http\Middleware\CheckLocale->handle(Object(Illuminate\Http\Request), Object(Closure)) #23 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array) #24 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #25 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #26 /var/www/snipeit/bootstrap/cache/compiled.php(3225): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #27 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure)) #28 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array) #29 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #30 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #31 /var/www/snipeit/bootstrap/cache/compiled.php(13139): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #32 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure)) #33 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array) #34 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #35 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #36 /var/www/snipeit/bootstrap/cache/compiled.php(13076): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #37 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure)) #38 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array) #39 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #40 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #41 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #42 /var/www/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #43 /var/www/snipeit/bootstrap/cache/compiled.php(8219): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #44 /var/www/snipeit/bootstrap/cache/compiled.php(8210): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request)) #45 /var/www/snipeit/bootstrap/cache/compiled.php(8200): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request)) #46 /var/www/snipeit/bootstrap/cache/compiled.php(2419): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request)) #47 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request)) #48 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #49 /var/www/snipeit/vendor/fideloper/proxy/src/TrustProxies.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #50 [internal function]: Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure)) #51 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array) #52 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #53 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #54 /var/www/snipeit/app/Http/Middleware/CheckForSetup.php(22): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #55 [internal function]: App\Http\Middleware\CheckForSetup->handle(Object(Illuminate\Http\Request), Object(Closure)) #56 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array) #57 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #58 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #59 /var/www/snipeit/app/Http/Middleware/NosniffGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #60 [internal function]: App\Http\Middleware\NosniffGuard->handle(Object(Illuminate\Http\Request), Object(Closure)) #61 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array) #62 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #63 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #64 /var/www/snipeit/app/Http/Middleware/XssProtectHeader.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #65 [internal function]: App\Http\Middleware\XssProtectHeader->handle(Object(Illuminate\Http\Request), Object(Closure)) #66 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array) #67 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #68 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #69 /var/www/snipeit/app/Http/Middleware/FrameGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #70 [internal function]: App\Http\Middleware\FrameGuard->handle(Object(Illuminate\Http\Request), Object(Closure)) #71 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array) #72 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #73 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #74 /var/www/snipeit/bootstrap/cache/compiled.php(13400): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #75 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure)) #76 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array) #77 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #78 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #79 /var/www/snipeit/bootstrap/cache/compiled.php(11943): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #80 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure)) #81 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array) #82 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #83 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #84 /var/www/snipeit/bootstrap/cache/compiled.php(3286): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #85 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure)) #86 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array) #87 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #88 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #89 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #90 /var/www/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #91 /var/www/snipeit/bootstrap/cache/compiled.php(2366): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #92 /var/www/snipeit/bootstrap/cache/compiled.php(2350): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request)) #93 /var/www/snipeit/public/index.php(55): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request)) #94 {main}

@dmeltzer
Copy link
Contributor

Yes. I can see why that's happening. I'm unsure of the proper fix though, waiting on snipe to weigh in. Currently it looks like only assets can actually be "accepted', which is what the code throwing the error is trying to do. I don't know if we want to only log the acceptance if it is an asset, or if we want to extend the schema of consumables/accessories to contain the knowledge that they were accepted (which doesn't really make sense directly, but it may require some other modifications.)

@stevecookms
Copy link
Author

I am not really needing the requirement for the user to accept the accessory, I just want the ability for the system to send an email stating the accessory has been checked out to them.

@rmgau
Copy link

rmgau commented Aug 5, 2016

Jumping in on this one to say I've hit the same problem.

Running the latest master. Error logs attached below.

Happy to help however I can with this one. Please let me know if there's anything I can do.

[13:36:52] LOG.error: exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'asset_id' cannot be null' in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php:441
Stack trace:
#0 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(441): PDOStatement->execute(Array)
#1 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(706): Illuminate\Database\Connection->Illuminate\Database{closure}(Object(Illuminate\Database\MySqlConnection), 'insert into as...', Array) #2 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(669): Illuminate\Database\Connection->runQueryCallback('insert intoas...', Array, Object(Closure))
#3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(442): Illuminate\Database\Connection->run('insert into as...', Array, Object(Closure)) #4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(398): Illuminate\Database\Connection->statement('insert intoas...', Array)
#5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\Database\Connection->insert('insert into as...', Array) #6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2055): Illuminate\Database\Query\Processors\Processor->processInsertGetId(Object(Illuminate\Database\Query\Builder), 'insert intoas...', Array, 'id')
#7 [internal function]: Illuminate\Database\Query\Builder->insertGetId(Array, 'id')
#8 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1399): call_user_func_array(Array, Array)
#9 /var/www/snipeit/bootstrap/cache/compiled.php(10852): Illuminate\Database\Eloquent\Builder->__call('insertGetId', Array)
#10 /var/www/snipeit/bootstrap/cache/compiled.php(10852): Illuminate\Database\Eloquent\Builder->insertGetId(Array, 'id')
#11 /var/www/snipeit/bootstrap/cache/compiled.php(10841): Illuminate\Database\Eloquent\Model->insertAndSetId(Object(Illuminate\Database\Eloquent\Builder), Array)
#12 /var/www/snipeit/bootstrap/cache/compiled.php(10792): Illuminate\Database\Eloquent\Model->performInsert(Object(Illuminate\Database\Eloquent\Builder), Array)
#13 /var/www/snipeit/app/Models/Actionlog.php(120): Illuminate\Database\Eloquent\Model->save()
#14 /var/www/snipeit/app/Http/Controllers/ViewAssetsController.php(271): App\Models\Actionlog->logaction('accepted')
#15 [internal function]: App\Http\Controllers\ViewAssetsController->postAcceptAsset('42')
#16 /var/www/snipeit/bootstrap/cache/compiled.php(9419): call_user_func_array(Array, Array)
#17 /var/www/snipeit/bootstrap/cache/compiled.php(9481): Illuminate\Routing\Controller->callAction('postAcceptAsset', Array)
#18 /var/www/snipeit/bootstrap/cache/compiled.php(9461): Illuminate\Routing\ControllerDispatcher->call(Object(App\Http\Controllers\ViewAssetsController), Object(Illuminate\Routing\Route), 'postAcceptAsset')
#19 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#20 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#21 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#22 /var/www/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#23 /var/www/snipeit/bootstrap/cache/compiled.php(9462): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#24 /var/www/snipeit/bootstrap/cache/compiled.php(9449): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(App\Http\Controllers\ViewAssetsController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'postAcceptAsset')
#25 /var/www/snipeit/bootstrap/cache/compiled.php(8517): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'App\Http\Contro...', 'postAcceptAsset')
#26 /var/www/snipeit/bootstrap/cache/compiled.php(8504): Illuminate\Routing\Route->runController(Object(Illuminate\Http\Request))
#27 /var/www/snipeit/bootstrap/cache/compiled.php(8218): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#28 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#29 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#30 /var/www/snipeit/app/Http/Middleware/Authenticate.php(45): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#31 [internal function]: App\Http\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
#32 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#33 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#34 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#35 /var/www/snipeit/app/Http/Middleware/CheckLocale.php(40): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#36 [internal function]: App\Http\Middleware\CheckLocale->handle(Object(Illuminate\Http\Request), Object(Closure))
#37 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#38 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#39 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#40 /var/www/snipeit/bootstrap/cache/compiled.php(3225): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#41 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#42 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#43 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#44 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#45 /var/www/snipeit/bootstrap/cache/compiled.php(13139): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#46 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#47 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#48 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#49 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#50 /var/www/snipeit/bootstrap/cache/compiled.php(13076): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#51 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#52 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#53 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#54 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#55 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#56 /var/www/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#57 /var/www/snipeit/bootstrap/cache/compiled.php(8219): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#58 /var/www/snipeit/bootstrap/cache/compiled.php(8210): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#59 /var/www/snipeit/bootstrap/cache/compiled.php(8200): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#60 /var/www/snipeit/bootstrap/cache/compiled.php(2419): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#61 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request))
#62 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#63 /var/www/snipeit/vendor/barryvdh/laravel-debugbar/src/Middleware/Debugbar.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#64 [internal function]: Barryvdh\Debugbar\Middleware\Debugbar->handle(Object(Illuminate\Http\Request), Object(Closure))
#65 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#66 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#67 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#68 /var/www/snipeit/vendor/fideloper/proxy/src/TrustProxies.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#69 [internal function]: Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#70 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#71 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#72 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#73 /var/www/snipeit/app/Http/Middleware/CheckForSetup.php(22): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#74 [internal function]: App\Http\Middleware\CheckForSetup->handle(Object(Illuminate\Http\Request), Object(Closure))
#75 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#76 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#77 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#78 /var/www/snipeit/app/Http/Middleware/NosniffGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#79 [internal function]: App\Http\Middleware\NosniffGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
#80 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#81 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#82 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#83 /var/www/snipeit/app/Http/Middleware/XssProtectHeader.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#84 [internal function]: App\Http\Middleware\XssProtectHeader->handle(Object(Illuminate\Http\Request), Object(Closure))
#85 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#86 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#87 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#88 /var/www/snipeit/app/Http/Middleware/FrameGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#89 [internal function]: App\Http\Middleware\FrameGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
#90 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#91 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#92 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#93 /var/www/snipeit/bootstrap/cache/compiled.php(13400): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#94 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#95 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#96 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#97 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#98 /var/www/snipeit/bootstrap/cache/compiled.php(11943): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#99 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#100 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#101 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#102 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#103 /var/www/snipeit/bootstrap/cache/compiled.php(3286): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#104 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#105 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#106 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#107 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#108 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#109 /var/www/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#110 /var/www/snipeit/bootstrap/cache/compiled.php(2366): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#111 /var/www/snipeit/bootstrap/cache/compiled.php(2350): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#112 /var/www/snipeit/public/index.php(55): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#113 {main}

Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'asset_id' cannot be null (SQL: insert into asset_logs (asset_id, component_id, accessory_id, asset_type, checkedout_to, note, user_id, accepted_at, action_type, updated_at, created_at) values (, , 1, accessory, 1, , 1, 2016-08-05 01:36:52, accepted, 2016-08-05 13:36:52, 2016-08-05 13:36:52))' in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php:713
Stack trace:
#0 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(669): Illuminate\Database\Connection->runQueryCallback('insert into as...', Array, Object(Closure)) #1 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(442): Illuminate\Database\Connection->run('insert intoas...', Array, Object(Closure))
#2 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(398): Illuminate\Database\Connection->statement('insert into as...', Array) #3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\Database\Connection->insert('insert intoas...', Array)
#4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2055): Illuminate\Database\Query\Processors\Processor->processInsertGetId(Object(Illuminate\Database\Query\Builder), 'insert into `as...', Array, 'id')
#5 [internal function]: Illuminate\Database\Query\Builder->insertGetId(Array, 'id')
#6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1399): call_user_func_array(Array, Array)
#7 /var/www/snipeit/bootstrap/cache/compiled.php(10852): Illuminate\Database\Eloquent\Builder->__call('insertGetId', Array)
#8 /var/www/snipeit/bootstrap/cache/compiled.php(10852): Illuminate\Database\Eloquent\Builder->insertGetId(Array, 'id')
#9 /var/www/snipeit/bootstrap/cache/compiled.php(10841): Illuminate\Database\Eloquent\Model->insertAndSetId(Object(Illuminate\Database\Eloquent\Builder), Array)
#10 /var/www/snipeit/bootstrap/cache/compiled.php(10792): Illuminate\Database\Eloquent\Model->performInsert(Object(Illuminate\Database\Eloquent\Builder), Array)
#11 /var/www/snipeit/app/Models/Actionlog.php(120): Illuminate\Database\Eloquent\Model->save()
#12 /var/www/snipeit/app/Http/Controllers/ViewAssetsController.php(271): App\Models\Actionlog->logaction('accepted')
#13 [internal function]: App\Http\Controllers\ViewAssetsController->postAcceptAsset('42')
#14 /var/www/snipeit/bootstrap/cache/compiled.php(9419): call_user_func_array(Array, Array)
#15 /var/www/snipeit/bootstrap/cache/compiled.php(9481): Illuminate\Routing\Controller->callAction('postAcceptAsset', Array)
#16 /var/www/snipeit/bootstrap/cache/compiled.php(9461): Illuminate\Routing\ControllerDispatcher->call(Object(App\Http\Controllers\ViewAssetsController), Object(Illuminate\Routing\Route), 'postAcceptAsset')
#17 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#18 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#19 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#20 /var/www/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#21 /var/www/snipeit/bootstrap/cache/compiled.php(9462): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#22 /var/www/snipeit/bootstrap/cache/compiled.php(9449): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(App\Http\Controllers\ViewAssetsController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'postAcceptAsset')
#23 /var/www/snipeit/bootstrap/cache/compiled.php(8517): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'App\Http\Contro...', 'postAcceptAsset')
#24 /var/www/snipeit/bootstrap/cache/compiled.php(8504): Illuminate\Routing\Route->runController(Object(Illuminate\Http\Request))
#25 /var/www/snipeit/bootstrap/cache/compiled.php(8218): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#26 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#27 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#28 /var/www/snipeit/app/Http/Middleware/Authenticate.php(45): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#29 [internal function]: App\Http\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
#30 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#31 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#32 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#33 /var/www/snipeit/app/Http/Middleware/CheckLocale.php(40): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#34 [internal function]: App\Http\Middleware\CheckLocale->handle(Object(Illuminate\Http\Request), Object(Closure))
#35 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#36 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#37 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#38 /var/www/snipeit/bootstrap/cache/compiled.php(3225): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#39 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#40 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#41 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#42 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#43 /var/www/snipeit/bootstrap/cache/compiled.php(13139): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#44 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#45 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#46 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#47 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#48 /var/www/snipeit/bootstrap/cache/compiled.php(13076): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#49 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#50 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#51 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#52 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#53 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#54 /var/www/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#55 /var/www/snipeit/bootstrap/cache/compiled.php(8219): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#56 /var/www/snipeit/bootstrap/cache/compiled.php(8210): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#57 /var/www/snipeit/bootstrap/cache/compiled.php(8200): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#58 /var/www/snipeit/bootstrap/cache/compiled.php(2419): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#59 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request))
#60 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#61 /var/www/snipeit/vendor/barryvdh/laravel-debugbar/src/Middleware/Debugbar.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#62 [internal function]: Barryvdh\Debugbar\Middleware\Debugbar->handle(Object(Illuminate\Http\Request), Object(Closure))
#63 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#64 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#65 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#66 /var/www/snipeit/vendor/fideloper/proxy/src/TrustProxies.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#67 [internal function]: Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#68 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#69 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#70 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#71 /var/www/snipeit/app/Http/Middleware/CheckForSetup.php(22): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#72 [internal function]: App\Http\Middleware\CheckForSetup->handle(Object(Illuminate\Http\Request), Object(Closure))
#73 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#74 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#75 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#76 /var/www/snipeit/app/Http/Middleware/NosniffGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#77 [internal function]: App\Http\Middleware\NosniffGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
#78 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#79 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#80 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#81 /var/www/snipeit/app/Http/Middleware/XssProtectHeader.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#82 [internal function]: App\Http\Middleware\XssProtectHeader->handle(Object(Illuminate\Http\Request), Object(Closure))
#83 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#84 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#85 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#86 /var/www/snipeit/app/Http/Middleware/FrameGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#87 [internal function]: App\Http\Middleware\FrameGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
#88 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#89 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#90 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#91 /var/www/snipeit/bootstrap/cache/compiled.php(13400): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#92 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#93 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#94 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#95 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#96 /var/www/snipeit/bootstrap/cache/compiled.php(11943): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#97 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#98 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#99 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#100 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#101 /var/www/snipeit/bootstrap/cache/compiled.php(3286): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#102 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#103 /var/www/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#104 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#105 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#106 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#107 /var/www/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#108 /var/www/snipeit/bootstrap/cache/compiled.php(2366): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#109 /var/www/snipeit/bootstrap/cache/compiled.php(2350): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#110 /var/www/snipeit/public/index.php(55): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#111 {main}

@stale
Copy link

stale bot commented Jan 21, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

@stale stale bot added the stale label Jan 21, 2018
@stale stale bot closed this as completed Jan 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants