Permalink
Browse files

add more strict condition inside getNewletterTypeEditForm to make New…

…sleterAdmin more robust.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@40816 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 48939b8 commit 628105c410063b83b490c03a18ef16cca96aa32d Normann Lou committed Aug 24, 2007
Showing with 2 additions and 2 deletions.
  1. +2 −2 code/NewsletterAdmin.php
View
@@ -167,8 +167,8 @@ public function getNewsletterTypeEditForm($id) {
if(isset($mailType) && is_object($mailType) && $mailType->GroupID) {
$group = DataObject::get_one("Group", "ID = $mailType->GroupID");
}
-
- if(isset($mailType)) {
+ //The function could be called from CMS with $mailType isset but with empty string.
+ if(isset($mailType)&&$mailType) {
$fields = new FieldSet(
new TextField("Title", "Newsletter Type"),
new TextField("FromEmail", "Send newsletters from"),

0 comments on commit 628105c

Please sign in to comment.