Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUGFIX When adding a top level folder in AssetAdmin, ensure you are

taken back to the top level folder view. Currently there is a non-object
error adding a root level folder.
  • Loading branch information...
commit 10f030de677b6f815b000bc9f53e0e4221b47ec6 1 parent f2f45d6
Sean Harvey halkyon authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 code/controllers/AssetAdmin.php
6 code/controllers/AssetAdmin.php
@@ -407,7 +407,11 @@ public function doAdd($data, $form) {
chmod($record->FullPath, Filesystem::$file_create_mask);
- return $this->redirect(Controller::join_links($this->Link('show'), $parentRecord->ID));
+ if($parentRecord) {
+ return $this->redirect(Controller::join_links($this->Link('show'), $parentRecord->ID));
+ } else {
+ return $this->redirect($this->Link());
+ }
Please sign in to comment.
Something went wrong with that request. Please try again.