if (count($packageData) < 3) {
// Not enougth fields in $packageData!
$this->setErrorCode(self::PACKAGE_ERROR_INCOMPLETE_DATA);
- } elseif (count(explode(NetworkPackage::PACKAGE_MASK_SEPERATOR, $packageData[2])) < 2) {
+ } elseif (count(explode(NetworkPackage::PACKAGE_MASK_SEPERATOR, $packageData[NetworkPackage::INDEX_PACKAGE_CONTENT])) < 2) {
// Not entougth fields in content
$this->setErrorCode(self::PACKAGE_ERROR_INVALID_CONTENT);
} elseif (!$this->ifRecipientMatchesOwnAddress($packageData)) {
const INDEX_TAGS = 2;
const INDEX_CHECKSUM = 3;
+ /**
+ * Array indexes for raw package array
+ */
+ const INDEX_PACKAGE_SENDER = 0;
+ const INDEX_PACKAGE_RECIPIENT = 1;
+ const INDEX_PACKAGE_CONTENT = 2;
+
/**
* Tags seperator
*/