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() { }