diff --git a/src/Storage/Part.php b/src/Storage/Part.php index 73936dc5..33a3747f 100644 --- a/src/Storage/Part.php +++ b/src/Storage/Part.php @@ -198,7 +198,7 @@ protected function _cacheContent() } $counter = 1; foreach ($parts as $part) { - $this->parts[$counter++] = new self(array('headers' => $part['header'], 'content' => $part['body'])); + $this->parts[$counter++] = new static(array('headers' => $part['header'], 'content' => $part['body'])); } } diff --git a/src/Storage/Part/File.php b/src/Storage/Part/File.php index e11d8209..a7b9d7a6 100644 --- a/src/Storage/Part/File.php +++ b/src/Storage/Part/File.php @@ -155,7 +155,7 @@ public function getPart($num) throw new Exception\RuntimeException('part not found'); } - return new self(array('file' => $this->fh, 'startPos' => $this->partPos[$num][0], + return new static(array('file' => $this->fh, 'startPos' => $this->partPos[$num][0], 'endPos' => $this->partPos[$num][1])); } }