Browse files

BUGFIX AssetAdmin root navigation (fixes #7448)

Return a new object instance rather than relying on singleton(),
which might've been modified elsewhere, and have a non-zero ID/ParentID.
  • Loading branch information...
1 parent f94f03d commit eaf05a6a7c9c7c214120922e12861e9dff25ca6c @chillu chillu committed Jun 14, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 code/controllers/AssetAdmin.php
View
2 code/controllers/AssetAdmin.php
@@ -462,7 +462,7 @@ public function currentPage() {
if($id && is_numeric($id) && $id > 0) {
return DataObject::get_by_id('Folder', $id);
} else {
- return singleton('Folder');
+ return new Folder();
}
}

0 comments on commit eaf05a6

Please sign in to comment.