-
Notifications
You must be signed in to change notification settings - Fork 8
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
PHP Warning - yy\base\ErrorException after user perms save #17
Comments
Could you post your |
Sure! notifications.php
UserSubscribed.php
Thank you |
So I think the issue is that your That should solve the error |
Thank you, the problem seems to be fixed! |
Hi,
I installed the plugin and used it as expected until now.
Yesterday I performed the 3.1 Craft update and then I tried to save a pre-existing user permission from Craft backend.
This is what I get (see the log below or the pdf attached). Even refreshing the page, the error persist, and the changes aren't applied.
Any idea to solve this?
Thank you
Log:
yii\base\ErrorException: Invalid argument supplied for foreach() in /var/www/copernit/vendor/rias/craft-notifications/src/services/NotificationsService.php:89
Stack trace:
#0 /var/www/copernit/vendor/craftcms/cms/src/web/ErrorHandler.php(76): yii\base\ErrorHandler->handleError(2, 'Invalid argumen...', '/var/www/copern...', 89)
#1 /var/www/copernit/vendor/rias/craft-notifications/src/services/NotificationsService.php(89): craft\web\ErrorHandler->handleError(2, 'Invalid argumen...', '/var/www/copern...', 89, Array)
#2 /var/www/copernit/vendor/rias/craft-notifications/src/Notifications.php(97): rias\notifications\services\NotificationsService->send(Object(app\notifications\UserSubscribed))
#3 [internal function]: rias\notifications\Notifications->rias\notifications{closure}(Object(craft\events\ModelEvent))
#4 /var/www/copernit/vendor/yiisoft/yii2/base/Event.php(310): call_user_func(Object(Closure), Object(craft\events\ModelEvent))
#5 /var/www/copernit/vendor/yiisoft/yii2/base/Component.php(636): yii\base\Event::trigger('craft\elements\...', 'afterSave', Object(craft\events\ModelEvent))
#6 /var/www/copernit/vendor/craftcms/cms/src/base/Element.php(1882): yii\base\Component->trigger('afterSave', Object(craft\events\ModelEvent))
#7 /var/www/copernit/vendor/craftcms/cms/src/elements/User.php(1323): craft\base\Element->afterSave(false)
#8 /var/www/copernit/vendor/craftcms/cms/src/services/Elements.php(515): craft\elements\User->afterSave(false)
#9 /var/www/copernit/vendor/craftcms/cms/src/controllers/UsersController.php(1042): craft\services\Elements->saveElement(Object(craft\elements\User), false)
#10 [internal function]: craft\controllers\UsersController->actionSaveUser()
#11 /var/www/copernit/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#12 /var/www/copernit/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#13 /var/www/copernit/vendor/craftcms/cms/src/web/Controller.php(109): yii\base\Controller->runAction('save-user', Array)
#14 /var/www/copernit/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('save-user', Array)
#15 /var/www/copernit/vendor/craftcms/cms/src/web/Application.php(297): yii\base\Module->runAction('users/save-user', Array)
#16 /var/www/copernit/vendor/craftcms/cms/src/web/Application.php(561): craft\web\Application->runAction('users/save-user', Array)
#17 /var/www/copernit/vendor/craftcms/cms/src/web/Application.php(281): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#18 /var/www/copernit/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#19 /var/www/copernit/web/index.php(21): yii\base\Application->run()
#20 {main}
yii_base_ErrorException.pdf
The text was updated successfully, but these errors were encountered: