There may be no subpackets

This commit is contained in:
Stephen Paul Weber 2010-04-01 09:21:00 -05:00
parent e3bc3757d1
commit 1c7f759798

View File

@ -424,13 +424,13 @@ class OpenPGP_SignaturePacket extends OpenPGP_Packet {
$body = chr(4).chr($this->signature_type).chr($this->key_algorithm).chr($this->hash_algorithm);
$hashed_subpackets = '';
foreach($this->hashed_subpackets as $p) {
foreach((array)$this->hashed_subpackets as $p) {
$hashed_subpackets .= $p->to_bytes();
}
$body .= pack('n', strlen($hashed_subpackets)).$hashed_subpackets;
$unhashed_subpackets = '';
foreach($this->unhashed_subpackets as $p) {
foreach((array)$this->unhashed_subpackets as $p) {
$unhashed_subpackets .= $p->to_bytes();
}
$body .= pack('n', strlen($unhashed_subpackets)).$unhashed_subpackets;