Skip to content

Commit

Permalink
BUGFIX AssetAdmin root navigation (fixes #7448)
Browse files Browse the repository at this point in the history
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
chillu committed Jun 14, 2012
1 parent f94f03d commit eaf05a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/controllers/AssetAdmin.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ public function currentPage() {
if($id && is_numeric($id) && $id > 0) { if($id && is_numeric($id) && $id > 0) {
return DataObject::get_by_id('Folder', $id); return DataObject::get_by_id('Folder', $id);
} else { } else {
return singleton('Folder'); return new Folder();
} }
} }


Expand Down

0 comments on commit eaf05a6

Please sign in to comment.