Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Three simple fixes at this point.
I couldn't quite decide what to do about:
Notice: Undefined variable: required in project\release\project_release.module on line 367
It looks like $required was a parameter that's been replaced by $size:
/**
* Modifies the given $form array to add the appropriate form element
* for the requested version field. Since the 20+ lines of code in
* here have to be duplicated 6 times in project_release_form(), this
* function exists so we can reuse the code.
* @see project_release_form
* @ingroup project_release_internal
*
* @param $form Form array to modify
* @param $release Relase node the form is for
* @param $modify Boolean indicating if we should allow modifications
* @param $format Version format string for this project
* @param $name Name of this version element
* @param $title Translatable title of the form element
* @param $description Translatable description of the form element.
* @param $required Boolean for if the form element should be required
*/
function _project_release_form_add_version_element(&$form, $release, $modify, $format, $name, $title, $description = '', $size = 10) {
Comment | File | Size | Author |
---|---|---|---|
project_release_eall.patch | 1.83 KB | drewish |
Comments
Comment #1
dwwIt looks like $required was a parameter that's been replaced by $size:
Oh yeah, whoops. That'd definitely something I did. ;) I'll take a close look when I get the chance and either re-roll the patch or at least comment here about what needs to happen.
Thanks!
-Derek
p.s. (The patch and component both talk about project_release, seems the old title was a typo...)
Comment #2
hunmonk CreditAttribution: hunmonk commentedtested and applied a modified version of this patch to 5.x-1.x
_project_release_form_add_version_element() was apparently designed to be able to mark form fields as required, but there was no way to pass in the $required var that would accomplish that. as part of the E_ALL fix, i've added $required as an optional argument at the end.
as for whether this code feature should be used on any of the existing for elements, let's handle that over at http://drupal.org/node/179414
leaving to be ported if anybody wants to brave the 4.7 land...
Comment #3
dwwComment #4
(not verified) CreditAttribution: commented