From 36fba1596d3403b2a26477626d146cd269ca45a5 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Thu, 1 Apr 2010 09:17:09 -0500 Subject: [PATCH] Default packet constructor can take data --- lib/openpgp.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/openpgp.php b/lib/openpgp.php index df8a107..13d6a9a 100644 --- a/lib/openpgp.php +++ b/lib/openpgp.php @@ -292,8 +292,9 @@ class OpenPGP_Packet { return array($tag, $head_length, $data_length); } - function __construct() { + function __construct($data=NULL) { $this->tag = array_search(substr(substr(get_class($this), 8), 0, -6), self::$tags); + $this->data = $data; } function read() {