Skip to content

Commit

Permalink
Merge pull request #37 from wopsononock/v1.2.0.2
Browse files Browse the repository at this point in the history
fixed empty-notification bug
  • Loading branch information
wopsononock authored Feb 16, 2023
2 parents 19ef1fc + 40546c2 commit 28058f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion features/ForceExpiration.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ private function _handleNotification(User $user) : void {
/* @var $notificationDao NotificationDAO */
$notificationDao = DAORegistry::getDAO('NotificationDAO');
$notification = $notificationDao->getById($lastNotification->id, $user->getId());
$notificationDao->deleteObject($notification);
if ($notification) {
$notificationDao->deleteObject($notification);
}
}

$notification = $notificationManager->createTrivialNotification($user->getId(), NOTIFICATION_TYPE_WARNING, array('contents' => __('plugins.generic.betterPassword.message.yourPasswordWillExpire', ['days' => $diffInDays])));
Expand Down
4 changes: 2 additions & 2 deletions version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<version>
<application>betterPassword</application>
<type>plugins.generic</type>
<release>1.2.0.1</release>
<date>2022-10-28</date>
<release>1.2.0.2</release>
<date>2023-02-16</date>
<lazy-load>1</lazy-load>
<sitewide>1</sitewide>
<class>BetterPasswordPlugin</class>
Expand Down

0 comments on commit 28058f6

Please sign in to comment.