mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
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:
parent
48939b8102
commit
628105c410
@ -167,8 +167,8 @@ class NewsletterAdmin extends LeftAndMain {
|
|||||||
if(isset($mailType) && is_object($mailType) && $mailType->GroupID) {
|
if(isset($mailType) && is_object($mailType) && $mailType->GroupID) {
|
||||||
$group = DataObject::get_one("Group", "ID = $mailType->GroupID");
|
$group = DataObject::get_one("Group", "ID = $mailType->GroupID");
|
||||||
}
|
}
|
||||||
|
//The function could be called from CMS with $mailType isset but with empty string.
|
||||||
if(isset($mailType)) {
|
if(isset($mailType)&&$mailType) {
|
||||||
$fields = new FieldSet(
|
$fields = new FieldSet(
|
||||||
new TextField("Title", "Newsletter Type"),
|
new TextField("Title", "Newsletter Type"),
|
||||||
new TextField("FromEmail", "Send newsletters from"),
|
new TextField("FromEmail", "Send newsletters from"),
|
||||||
|
Loading…
Reference in New Issue
Block a user