MINOR Fixed empty breadcrumbs in AssetAdmin when using non-existent (singleton) record as the "current record"

This commit is contained in:
Ingo Schommer 2012-03-01 00:15:56 +01:00
parent 7f7d6b3bea
commit 1b600a0b09

View File

@ -514,7 +514,7 @@ class LeftAndMain extends Controller {
))
));
$record = $this->currentPage();
if($record) {
if($record && $record->exists()) {
if($record->hasExtension('Hierarchy')) {
$ancestors = $record->getAncestors();
$ancestors = new ArrayList(array_reverse($ancestors->toArray()));