add more strict condition inside getNewletterTypeEditForm to make NewsleterAdmin more robust.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@40816 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Normann Lou 2007-08-24 03:50:17 +00:00
parent 48939b8102
commit 628105c410
1 changed files with 2 additions and 2 deletions

View File

@ -167,8 +167,8 @@ class NewsletterAdmin extends LeftAndMain {
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"),