Skip to content

Commit

Permalink
No need to unwrap to an array
Browse files Browse the repository at this point in the history
Since OpenPGP_Message implements the array interface
  • Loading branch information
singpolyma committed Mar 31, 2010
1 parent 975fc2f commit 1a1b898
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/openpgp.php
Original file line number Diff line number Diff line change
Expand Up @@ -790,15 +790,12 @@ function read() {
default:
/* TODO error? */
}
if($this->data) {
$this->data = $this->data->packets;
}
}

// IteratorAggregate interface

function getIterator() {
return new ArrayIterator($this->data);
return new ArrayIterator($this->data->packets);
}

// ArrayAccess interface
Expand Down

0 comments on commit 1a1b898

Please sign in to comment.