Skip to content

Commit

Permalink
Merge branch 'php8-typeerror-htmlspecialchars' of github.com:EGroupwa…
Browse files Browse the repository at this point in the history
…re/Crypt into EGroupware-php8-typeerror-htmlspecialchars
  • Loading branch information
yunosh committed Nov 17, 2022
2 parents 95eb2d4 + 17515e1 commit 5ca0e7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Horde/Crypt/Smime.php
Expand Up @@ -50,7 +50,7 @@ public function verifyPassphrase($private_key, $passphrase)
? openssl_pkey_get_private($private_key)
: openssl_pkey_get_private($private_key, $passphrase);

return is_resource($res);
return ($res !== false);
}

/**
Expand Down Expand Up @@ -543,7 +543,7 @@ public function certToHTML($cert)
htmlspecialchars(
isset($fieldnames[$key]) ? $fieldnames[$key] : $key
),
htmlspecialchars($value)
htmlspecialchars(implode(', ', (array)$value))
);
}
$text .= "\n";
Expand All @@ -553,6 +553,7 @@ public function certToHTML($cert)
'<strong>' . Horde_Crypt_Translation::t("Issuer") . ':</strong>';

foreach ($details['issuer'] as $key => $value) {
if (is_array($value)) $value = implode(', ', $value);
$text .= sprintf(
"\n&nbsp;&nbsp;%s: %s",
htmlspecialchars(
Expand Down

0 comments on commit 5ca0e7e

Please sign in to comment.