While working on updating one of my modules i noticed that blogapi.module uses old way:

$node = node_validate($edit)

which AFAIK doesn't work anymore and should be at least:

$node = array2object($edit);
node_validate($node);

Here comes tiny patch which should make it work ok. I didn't change how blogapi creates node's data - if it created it as object from the beginning it wouldn't have to call array2object later.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

walkah’s picture

Status: Needs review » Fixed

hmm. actually my node_validate looks like this:

function node_validate($node) {
  // Convert the node to an object, if necessary.
  $node = array2object($node);

I think we're ok.

(that's from // $Id: node.module,v 1.568 2005-12-15 16:24:40 dries Exp $)

chx’s picture

Status: Fixed » Active

and in my copy of node.module node_validate returns nada therefore this is a valid bug.

walkah’s picture

Version: 4.7.0-beta1 » 4.7.0-beta2
Assigned: Unassigned » walkah
Status: Active » Reviewed & tested by the community
FileSize
1.58 KB

chx: great eye. you're absolutely right.

attached patch adds node_submit() for new_post and edit_post

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)