diff --git a/phpseclib/File/ASN1.php b/phpseclib/File/ASN1.php index 4bd355a1e..98fe4b83a 100644 --- a/phpseclib/File/ASN1.php +++ b/phpseclib/File/ASN1.php @@ -577,6 +577,10 @@ function _decode_ber($encoded, $start = 0, $encoded_pos = 0) */ function asn1map($decoded, $mapping, $special = array()) { + if (!is_array($decoded)) { + return false; + } + if (isset($mapping['explicit']) && is_array($decoded['content'])) { $decoded = $decoded['content'][0]; }