1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #3805 from beganovich/fix-array_intersect

fix array intersect
This commit is contained in:
David Bomba 2020-06-16 21:34:52 +10:00 committed by GitHub
commit b82e71cd61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ trait UserNotifies
array_push($required_permissions, "all_user_notifications");
}
if (count(array_intersect($required_permissions, $notifications->email)) >=1 || count(array_intersect($required_permissions, "all_user_notifications")) >=1 || count(array_intersect($required_permissions, "all_notifications")) >=1) {
if (count(array_intersect($required_permissions, $notifications->email)) >=1 || count(array_intersect($required_permissions, ['all_user_notifications'])) >=1 || count(array_intersect($required_permissions, ['all_notifications'])) >=1) {
array_push($notifiable_methods, 'mail');
}
@ -73,7 +73,7 @@ trait UserNotifies
$notifiable_methods = [];
$notifications = $company_user->notifications;
if (count(array_intersect($required_permissions, $notifications->email)) >=1 || count(array_intersect($required_permissions, "all_user_notifications")) >=1 || count(array_intersect($required_permissions, "all_notifications")) >=1) {
if (count(array_intersect($required_permissions, $notifications->email)) >=1 || count(array_intersect($required_permissions, ['all_user_notifications'])) >=1 || count(array_intersect($required_permissions, ['all_notifications'])) >=1) {
array_push($notifiable_methods, 'mail');
}