Code overrides comment-form #submit handlers
pexxi - May 6, 2009 - 21:34
| Project: | album photos |
| Version: | 6.x-2.6-beta3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi,
I found small bug in comments.module, in code used for hook on comment_form (photos_form_alter()). Your code overrides form #submit handler, so there is no possibility to add custom #submit handler in any other module:
621: $form['#submit'] = array('photos_comment_form_submit');Correct code should be:
621: $form['#submit'][] = 'photos_comment_form_submit';It spent me "a few minutes" to find, where the problem is...

#1
Aaa, code should be:
$form['#submit']=array_diff($form['#submit'], array('comment_form_submit'));$form['#submit'][] = 'photos_comment_form_submit';