Two errors, $form['#submit'] and $form['#validate'] no longer support custom parameters and Validation for specific form elements now uses the #element_validate property, that I'm getting while working on a module took a bit of time to hunt down the documentation for. It would be lovely if these were linked to http://drupal.org/node/144132#custom-params and http://drupal.org/node/144132#element-validate respectively.

The attached patch fixes this, but I'm unsure about what to do with '#source' => 'allphp', so that one's currently all over the place. I couldn't figure out any obvious naming standards either, so that might need to be tweaked as well. But all in all, this patch does what it's supposed to, it just needs a knowledgeable hand to fix a few of the current curiosities. :)

(I also wasn't sure whether to consider this a bug report or feature request, so feel free to re-categorise.)

Comments

douggreen’s picture

Thanks! You don't need the #source in the warning callbacks.

Freso’s picture

Status: Needs review » Needs work

Alright. So they (= #source) should not be there at all, or should they still be included in the coder_6x_reviews() array? How about naming standards? Should I re-roll this or will you give it a whirl in your knowledgeable hands? :)

Freso’s picture

Status: Needs work » Needs review
StatusFileSize
new2.07 KB

#223908: D6 modules should now use menu_get_object() broke the patch, so here's a re-roll. Note that #source is still in the coder_6x_reviews() array, but has been removed from the callback functions.

douggreen’s picture

Status: Needs review » Fixed

Thanks! I committed it to the 5.x and 6.x branches.

Freso’s picture

Status: Fixed » Reviewed & tested by the community

Are you sure it's committed? It doesn't show up in cvs.drupal.org under any branch and it doesn't come with cvs up either.

douggreen’s picture

Status: Reviewed & tested by the community » Fixed

Hmm, I don't know what happened, I've committed it now.

Freso’s picture

Well, it has indeed gone in now, so hopefully folks encountering these warnings in the future will have easier access to documentation. So it's all good! :D

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.