From 36971482a0d8e63541cb071d99b988c952637498 Mon Sep 17 00:00:00 2001 From: djmaze Date: Wed, 1 Sep 2021 11:02:51 +0200 Subject: [PATCH] Some code cleanups --- dev/Knoin/AbstractViews.js | 2 +- snappymail/v/0.0.0/app/libraries/MailSo/Base/Crypt.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/Knoin/AbstractViews.js b/dev/Knoin/AbstractViews.js index 4affd299e..ed4e85901 100644 --- a/dev/Knoin/AbstractViews.js +++ b/dev/Knoin/AbstractViews.js @@ -74,7 +74,7 @@ export class AbstractViewPopup extends AbstractView */ registerPopupKeyDown() { addEventListener('keydown', event => { - if (event && this.modalVisibility && this.modalVisibility()) { + if (event && this.modalVisibility()) { if (!this.bDisabeCloseOnEsc && 'Escape' == event.key) { this.cancelCommand(); return false; diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Base/Crypt.php b/snappymail/v/0.0.0/app/libraries/MailSo/Base/Crypt.php index 57c09d71c..662fceac1 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Base/Crypt.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Base/Crypt.php @@ -20,7 +20,7 @@ class Crypt public static function Encrypt(string $sString, string $sKey, string $sCipher = '') : string { - if (0 === \strlen($sString)) { + if (!\strlen($sString)) { return ''; } if ($sCipher && \is_callable('openssl_encrypt')) { @@ -35,7 +35,7 @@ class Crypt public static function Decrypt(string $sString, string $sKey, string $sCipher = '') : string { - if (0 === \strlen($sString)) { + if (!\strlen($sString)) { return ''; } if ($sCipher && \is_callable('openssl_encrypt')) {