Skip to content

Commit

Permalink
EZP-20057: Fixed TrashItem::$path dynamic property getter
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Longosz committed Jan 19, 2017
1 parent 91ad3ec commit 8781661
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions eZ/Publish/Core/Repository/Values/Content/TrashItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,11 @@ public function __get($property)
case 'contentId':
return $this->contentInfo->id;
case 'path':
if ($this->path !== null) {
return $this->path;
}
if (isset($this->pathString[1]) && $this->pathString[0] === '/') {
return $this->path = explode('/', trim($this->pathString, '/'));
return explode('/', trim($this->pathString, '/'));
}

return $this->path = array();
return [];
}

return parent::__get($property);
Expand Down

0 comments on commit 8781661

Please sign in to comment.