Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When editing a profile using the administrative overlay, I get the following warnings:
Notice: Undefined variable: accepted in legal_form_user_profile_form_alter() (line 296 of /var/www/html/sites/all/modules/legal/legal.module).
Notice: Undefined variable: accepted in legal_form_user_profile_form_alter() (line 310 of /var/www/html/sites/all/modules/legal/legal.module).
Notice: Undefined variable: accepted in legal_form_user_profile_form_alter() (line 336 of /var/www/html/sites/all/modules/legal/legal.module).
When editing a profile without the overlay, no warnings appear.
Comment | File | Size | Author |
---|---|---|---|
#8 | legal-undefined_accepted-1356822-8.patch | 496 bytes | cpliakas |
#3 | legal-undefined_accepted-1356822-3.patch | 491 bytes | rooby |
#1 | legal.patch | 552 bytes | Nexotap |
Comments
Comment #1
Nexotap CreditAttribution: Nexotap commentedI just had the same problem. i solved it, while adding an extra line where $accepted gets defined.
See the patch file for my solution. I dont know if that's the right attempt, at least it solves the problem for me.
You may also blame me for the patch file, since this is my very first (blush) patch I'm commiting.
Cheers
~Nexo
BTW. If I do, like here, have a patch. Am I encouraged to change the Status for the Issue?
Comment #2
rooby CreditAttribution: rooby commentedI get the first error when UI
I get this and I am not using the admin overlay.
@Nexotap:
Yep, when you add a patch set to needs review.
See http://drupal.org/node/156119 for more information.
Comment #3
rooby CreditAttribution: rooby commentedHere is a slight variation on the patch in #1.
Comment #4
rooby CreditAttribution: rooby commentedPatch is against dev but applies to 7.x-1.2
Comment #5
rooby CreditAttribution: rooby commentedOops, I accidentally changed the title back.
Comment #6
cpliakas CreditAttribution: cpliakas commentedGetting the same error, patch in #3 works as advertised.
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedWhile the patch works it needs some work with regard to indentation alignment so that it matches the previous code. There needs to be indentation alignment work WRT drupal coding standards throughout the module but that is a different issue.
Comment #8
cpliakas CreditAttribution: cpliakas commentedThe attached patch uses the same functionality but performs indentation according to Drupal Coding standards. As mentioned in #7, a separate issue should probably be opened to address the other issues throughout the module.
Thanks,
Chris
Comment #9
cpliakas CreditAttribution: cpliakas commentedSeparate issue for coding standards posted at #1467826: Replace tabs with spaces to adhere to Drupal coding standards.
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #11
marcoka CreditAttribution: marcoka commentedtested, seems to be obvious to initialize the variable $accepted in this case because in code it is only "filled" in the "else" and that doesnt always we called.
Comment #12
marcoka CreditAttribution: marcoka commentedpush. any opinions from the maintainers?
Comment #13
eodonnell CreditAttribution: eodonnell commentedCan we get this committed?
Comment #14
Robert Castelo CreditAttribution: Robert Castelo commentedI can't reproduce this error.
What page are you on (path)?
Are you logged in as admin or the user who's account is being edited?
"When editing a profile" - do you mean an account page?
Comment #15
Robert Castelo CreditAttribution: Robert Castelo commentedComment #16
Robert Castelo CreditAttribution: Robert Castelo commentedAdded cpliakas patch in #8 to dev
Couldn't reproduce the issue, but makes sense to initialise the $accepted variable. If this hasn't fixed the issue please re-open with more info on how to reproduce the bug.
Comment #18
chrisjlee CreditAttribution: chrisjlee commentedI have the same problem and unintentionally created a duplicate issue #1935350: Notice: Undefined variable: accepted in legal_form_user_profile_form_alter() (line 296 of /home/ubuntu/site/prod/sites/all/modul
From #1935350: Notice: Undefined variable: accepted in legal_form_user_profile_form_alter() (line 296 of /home/ubuntu/site/prod/sites/all/modul: