-
Notifications
You must be signed in to change notification settings - Fork 32
Fix Registration Form Submission #237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ function guest_register() { | |
| $nick = ""; | ||
| $lastname = ""; | ||
| $prename = ""; | ||
| $age = ""; | ||
| $age = 0; | ||
| $tel = ""; | ||
| $dect = ""; | ||
| $mobile = ""; | ||
|
|
@@ -29,6 +29,8 @@ function guest_register() { | |
| $jabber = ""; | ||
| $hometown = ""; | ||
| $comment = ""; | ||
| $native_lang = ""; | ||
| $other_langs = ""; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These two variables are not initialized while showing the form, hence errors were displayed similar to 'Undefined variable $native_lang' |
||
| $twitter = ""; | ||
| $facebook = ""; | ||
| $github = ""; | ||
|
|
@@ -44,7 +46,7 @@ function guest_register() { | |
|
|
||
| $welcome_message = WelcomeMessage(); | ||
| $display_message = $welcome_message[0]['display_msg']; | ||
| $angel_types_source = select_angeltype(); | ||
| $angel_types_source = select_angeltypes(); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A typo, as the function that exist in the system has the name 'select_angeltypes()' |
||
| $angel_types = array(); | ||
| foreach ($angel_types_source as $angel_type) { | ||
| $angel_types[$angel_type['id']] = $angel_type['name'] . ($angel_type['restricted'] ? " (restricted)" : ""); | ||
|
|
@@ -182,17 +184,17 @@ function guest_register() { | |
| $ok = false; | ||
| $msg .= error(_("Please select a timezone"), true); | ||
| } | ||
| if (isset($_REQUEST['age']) && preg_match("/^[0-9]{0,4}$/", $_REQUEST['age'])) | ||
| if (isset($_REQUEST['age']) && $_REQUEST['age'] != '' && preg_match("/^[0-9]{0,4}$/", $_REQUEST['age'])) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'Alter' field in the user table cannot have an empty value |
||
| $age = strip_request_item('age'); | ||
| if (isset($_REQUEST['tel'])) | ||
| $tel = strip_request_item('tel'); | ||
| if (isset($_REQUEST['dect'])) | ||
| $dect = strip_request_item('dect'); | ||
| if (isset($_REQUEST['native_lang'])) | ||
| $native_lang = strip_request_item('native_lang'); | ||
| if (isset($_REQUEST['other_lang'])) { | ||
| if (isset($_REQUEST['other_langs'])) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A typo as the name of the multiselect field is other_langs |
||
| $other_langs = ""; | ||
| $langs = $_REQUEST['other_lang']; | ||
| $langs = $_REQUEST['other_langs']; | ||
| foreach($langs as $lang) { | ||
| $other_langs .= $lang . ','; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the 'Alter' field in the User table is an integer, it cannot be set equal to an empty value