Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | blogapi-node-submit.patch | 1.58 KB | walkah |
blogapi.module_4.patch | 423 bytes | ahwayakchih | |
Comments
Comment #1
walkah CreditAttribution: walkah commentedhmm. actually my node_validate looks like this:
I think we're ok.
(that's from
// $Id: node.module,v 1.568 2005-12-15 16:24:40 dries Exp $
)Comment #2
chx CreditAttribution: chx commentedand in my copy of node.module node_validate returns nada therefore this is a valid bug.
Comment #3
walkah CreditAttribution: walkah commentedchx: great eye. you're absolutely right.
attached patch adds node_submit() for new_post and edit_post
Comment #4
Dries CreditAttribution: Dries commentedCommitted to HEAD. Thanks.
Comment #5
(not verified) CreditAttribution: commented