Fixed $nlCheckboxes notice

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@44135 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Jeremy Shipman 2007-11-02 00:28:42 +00:00
parent afd16bf60b
commit 40eb79da40

View File

@ -75,10 +75,14 @@ class SubscribeForm extends UserDefinedForm {
$newsletterTypes = DataObject::get( 'NewsletterType' ); $newsletterTypes = DataObject::get( 'NewsletterType' );
$availableNewsletters = array(); $availableNewsletters = array();
$nlCheckboxes = array();
foreach( $this->Newsletters() as $subscribeTo ) foreach( $this->Newsletters() as $subscribeTo )
$availableNewsletters[] = $subscribeTo->ID; $availableNewsletters[] = $subscribeTo->ID;
// create a checkbox for each newsletter // create a checkbox for each newsletter
if($newsletterTypes && is_object($newsletterTypes)) { if($newsletterTypes && is_object($newsletterTypes)) {
foreach( $newsletterTypes as $newsletterType ) foreach( $newsletterTypes as $newsletterType )