Drupal 7 – Legal module error – Notice: Undefined variable: accepted in legal_form_user_profile_form_alter()

The stable release of the Legal module has so many errors. But this one is also found in the dev release.

This error this time is
Notice: Undefined variable: accepted in legal_form_user_profile_form_alter()…

Use the following patch.

diff --git a/legal.module b/legal.module
index 4707331..4f331cd 100644
--- a/legal.module
+++ b/legal.module
@@ -270,6 +270,7 @@ function legal_form_user_profile_form_alter(&$form, $form_state) {
 	$legal_account = legal_get_accept($account->uid);
 
 	// If no version has been accepted yet, get version with current language revision.
+       $accepted = FALSE;
 	if (empty($legal_account['version'])) {
 	  $conditions = legal_get_conditions($language->language);
 	  // No conditions set yet.

 

Done =)

Reference: Notice: Undefined variable: accepted in legal_form_user_profile_form_alter()

About these ads

2 thoughts on “Drupal 7 – Legal module error – Notice: Undefined variable: accepted in legal_form_user_profile_form_alter()”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s