Skip to content

Commit

Permalink
Issue #94. Send a proper entity to field_attach_form (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
argiepiano authored Mar 3, 2025
1 parent 93158d6 commit 7d4ac5f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion privatemsg.pages.inc
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,12 @@ function _privatemsg_form_base_fields($form, &$form_state) {
);

// Attach field widgets.
$message = (object) array();
if (isset($form_state['validate_built_message'])) {
$message = $form_state['validate_built_message'];
}
else {
$message = entity_create('privatemsg_message', array('bundle' => 'privatemsg_message'));
}

// If a module (e.g. OG) adds a validate or submit callback to the form in
// field_attach_form, the form system will not add ours automatically
Expand Down

0 comments on commit 7d4ac5f

Please sign in to comment.