Skip to content

Commit

Permalink
Bugfix: Don't assume all forms have a URLSegment field
Browse files Browse the repository at this point in the history
  • Loading branch information
mikenz authored Dec 14, 2017
1 parent 33622c4 commit 157db89
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Extension/SiteTreeSubsites.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ public function updateCMSFields(FieldList $fields)
}

$urlsegment = $fields->dataFieldByName('URLSegment');
$urlsegment->setURLPrefix($baseLink);
if ($urlsegment) {
$urlsegment->setURLPrefix($baseLink);
}
}
}

Expand Down

0 comments on commit 157db89

Please sign in to comment.