From 355ea44301aba513fb6b099c8490f1deba34bdd2 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 31 Mar 2010 14:25:21 -0500 Subject: [PATCH] Set tag on packet creation --- lib/openpgp.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/openpgp.php b/lib/openpgp.php index e6e3098..7cbb9df 100644 --- a/lib/openpgp.php +++ b/lib/openpgp.php @@ -258,7 +258,9 @@ class OpenPGP_Packet { return array($tag, $head_length, $data_length); } - function __construct() {} + function __construct() { + $this->tag = array_search(substr(substr(get_class($this), 8), 0, -6), self::$tags); + } function read() { }