Skip to content
This repository
Browse code

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...
commit eaf05a6a7c9c7c214120922e12861e9dff25ca6c 1 parent f94f03d
Ingo Schommer authored June 14, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  code/controllers/AssetAdmin.php
2  code/controllers/AssetAdmin.php
@@ -462,7 +462,7 @@ public function currentPage() {
462 462
 		if($id && is_numeric($id) && $id > 0) {
463 463
 			return DataObject::get_by_id('Folder', $id);
464 464
 		} else {
465  
-			return singleton('Folder');
  465
+			return new Folder();
466 466
 		}
467 467
 	}
468 468
 	

0 notes on commit eaf05a6

Please sign in to comment.
Something went wrong with that request. Please try again.