From 49010a70a02d8edfa5a48c68554b708c1d53a4f1 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Mon, 11 Sep 2023 21:44:57 +0200 Subject: [PATCH] Resolve #1237 --- snappymail/v/0.0.0/app/libraries/snappymail/pgp/gnupg.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snappymail/v/0.0.0/app/libraries/snappymail/pgp/gnupg.php b/snappymail/v/0.0.0/app/libraries/snappymail/pgp/gnupg.php index 947e8f47f..4e420a734 100644 --- a/snappymail/v/0.0.0/app/libraries/snappymail/pgp/gnupg.php +++ b/snappymail/v/0.0.0/app/libraries/snappymail/pgp/gnupg.php @@ -299,13 +299,13 @@ class GnuPG 'private' => [] ]; // Public - foreach ($this->handler()->keyinfo($pattern) as $key) { + foreach (($this->handler()->keyinfo($pattern) ?: []) as $key) { $key['can_verify'] = $key['can_sign']; unset($key['can_sign']); $keys['public'][] = $key; } // Private, read https://github.com/php-gnupg/php-gnupg/issues/5 - foreach ($this->handler()->keyinfo($pattern, 1) as $key) { + foreach (($this->handler()->keyinfo($pattern, 1) ?: []) as $key) { $key['can_decrypt'] = $key['can_encrypt']; unset($key['can_encrypt']); $keys['private'][] = $key;