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) {
CommentFileSizeAuthor
project_release_eall.patch1.83 KBdrewish
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dww’s picture

Title: E_ALL Compliance: Fix PHP Notices in issue.inc » E_ALL Compliance: Fix PHP Notices in project_release
Assigned: Unassigned » dww
Status: Needs review » Needs work

It 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...)

hunmonk’s picture

Version: 5.x-1.x-dev » 4.7.x-2.x-dev
Status: Needs work » Patch (to be ported)

tested 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...

dww’s picture

Version: 4.7.x-2.x-dev » 5.x-1.x-dev
Assigned: dww » Unassigned
Status: Patch (to be ported) » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)