wintercms / wn-user-plugin

Front-end User plugin for Winter CMS
https://wintercms.com/
MIT License
10 stars 20 forks source link

Error when sending an invitation with Debugbar enabled #7

Open rubenvanerk opened 3 years ago

rubenvanerk commented 3 years ago

When I choose the option to send an invitation I get the error: Symfony\Component\Debug\Exception\FatalThrowableError: array_merge(): Argument #1 must be of type array, null given in /path/to/project/plugins/winter/user/models/User.php:498

Contents of $result on that line:

array:1 [
  0 => null
]
bennothommo commented 3 years ago

@rubenvanerk Could you provide us with a full backtrace so I can track this back through the invitation process?

rubenvanerk commented 3 years ago

Sure! Here it is:

  ErrorException: array_merge(): Expected parameter 1 to be an array, null given in /path/to/project/plugins/winter/user/models/User.php:498
  Stack trace:
  #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
  #1 [internal function]: array_merge()
  #2 /path/to/project/plugins/winter/user/models/User.php(498): call_user_func_array()
  #3 /path/to/project/plugins/winter/user/models/User.php(510): Winter\User\Models\User->getNotificationVars()
  #4 /path/to/project/plugins/winter/user/models/User.php(275): Winter\User\Models\User->sendInvitation()
  #5 /path/to/project/vendor/winter/storm/src/Database/Model.php(166): Winter\User\Models\User->afterCreate()
  #6 /path/to/project/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(369): Winter\Storm\Database\Model->Winter\Storm\Database\{closure}()
  #7 /path/to/project/vendor/winter/storm/src/Events/Dispatcher.php(112): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}()
  #8 /path/to/project/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php(189): Winter\Storm\Events\Dispatcher->dispatch()
  #9 /path/to/project/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(826): Illuminate\Database\Eloquent\Model->fireModelEvent()
  #10 /path/to/project/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(668): Illuminate\Database\Eloquent\Model->performInsert()
  #11 /path/to/project/vendor/winter/storm/src/Database/Model.php(791): Illuminate\Database\Eloquent\Model->save()
  #12 /path/to/project/vendor/winter/storm/src/Database/Model.php(824): Winter\Storm\Database\Model->saveInternal()
  #13 /path/to/project/modules/backend/behaviors/FormController.php(252): Winter\Storm\Database\Model->save()
  #14 /path/to/project/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(29): Backend\Behaviors\FormController->Backend\Behaviors\{closure}()
  #15 /path/to/project/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(349): Illuminate\Database\Connection->transaction()
  #16 /path/to/project/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\Database\DatabaseManager->__call()
  #17 /path/to/project/modules/backend/behaviors/FormController.php(254): Illuminate\Support\Facades\Facade::__callStatic()
  #18 [internal function]: Backend\Behaviors\FormController->create_onSave()
  #19 /path/to/project/vendor/winter/storm/src/Extension/ExtendableTrait.php(413): call_user_func_array()
  #20 /path/to/project/modules/backend/classes/Controller.php(184): Backend\Classes\Controller->extendableCall()
  #21 [internal function]: Backend\Classes\Controller->__call()
  #22 /path/to/project/modules/backend/classes/Controller.php(620): call_user_func_array()
  #23 /path/to/project/modules/backend/classes/Controller.php(478): Backend\Classes\Controller->runAjaxHandler()
  #24 /path/to/project/modules/backend/classes/Controller.php(277): Backend\Classes\Controller->execAjaxHandlers()
  #25 /path/to/project/modules/backend/classes/BackendController.php(173): Backend\Classes\Controller->run()
  #26 /path/to/project/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Backend\Classes\BackendController->run()
  #27 /path/to/project/modules/backend/classes/BackendController.php(119): Illuminate\Routing\Controller->callAction()
  #28 /path/to/project/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Backend\Classes\BackendController->callAction()
  #29 /path/to/project/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\Routing\ControllerDispatcher->dispatch()
  #30 /path/to/project/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\Routing\Route->runController()
  #31 /path/to/project/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\Routing\Route->run()
  #32 /path/to/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Routing\Router->Illuminate\Routing\{closure}()
  #33 /path/to/project/modules/backend/classes/BackendController.php(68): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
  #34 /path/to/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(153): Backend\Classes\BackendController->Backend\Classes\{closure}()
  #35 /path/to/project/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
  #36 /path/to/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Routing\Middleware\SubstituteBindings->handle()
  #37 /path/to/project/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
  #38 /path/to/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
  #39 /path/to/project/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
  #40 /path/to/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Session\Middleware\StartSession->handle()
  #41 /path/to/project/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
  #42 /path/to/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
  #43 /path/to/project/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
  #44 /path/to/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Cookie\Middleware\EncryptCookies->handle()
  #45 /path/to/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
  #46 /path/to/project/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\Pipeline\Pipeline->then()
  #47 /path/to/project/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\Routing\Router->runRouteWithinStack()
  #48 /path/to/project/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\Routing\Router->runRoute()
  #49 /path/to/project/vendor/winter/storm/src/Router/CoreRouter.php(20): Illuminate\Routing\Router->dispatchToRoute()
  #50 /path/to/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(170): Winter\Storm\Router\CoreRouter->dispatch()
  #51 /path/to/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
  #52 /path/to/project/plugins/winter/debugbar/middleware/InjectDebugbar.php(30): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
  #53 /path/to/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Winter\Debugbar\Middleware\InjectDebugbar->handle()
  #54 /path/to/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
  #55 /path/to/project/vendor/winter/storm/src/Foundation/Http/Middleware/CheckForMaintenanceMode.php(25): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle()
  #56 /path/to/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Winter\Storm\Foundation\Http\Middleware\CheckForMaintenanceMode->handle()
  #57 /path/to/project/vendor/winter/storm/src/Http/Middleware/TrustHosts.php(46): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
  #58 /path/to/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Winter\Storm\Http\Middleware\TrustHosts->handle()
  #59 /path/to/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
  #60 /path/to/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\Pipeline\Pipeline->then()
  #61 /path/to/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
  #62 /path/to/project/index.php(43): Illuminate\Foundation\Http\Kernel->handle()
  #63 /path/to/project/server.php(17): require_once('/path/to/pro...')
  #64 {main}
mjauvin commented 3 years ago

@rubenvanerk do you have the debugbar plugin installed? try disabling it to see if it helps.

rubenvanerk commented 3 years ago

@mjauvin That helped! No problems with DEBUGBAR_ENABLED set to false