The first line in hook_prepare reads:
if ($file = file_check_upload($field_name))

but file_check_upload doesn't exist anymore :) slightly confusing.

CommentFileSizeAuthor
#2 remove_file_check_upload-2222497-2.patch1.09 KBmojzis

Comments

longwave’s picture

Title: Hook_prepare in node.api uses a D6 only function » hook_prepare() example uses a D6 only function
Version: 7.26 » 7.x-dev
Component: node system » documentation
Issue tags: -document hooks
mojzis’s picture

StatusFileSize
new1.09 KB

simple patch attached.

longwave’s picture

Status: Active » Needs review
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks OK, and fixes the stated problem. I'm really not sure why the original code just silently returned if the file couldn't be uploaded, but this patch doesn't make it any worse.

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again! Committed to 7.x.

  • Commit 440ebcb on 7.x by jhodgdon:
    Issue #2222497 by mojzis: Replace obsolete function reference in...

Status: Fixed » Closed (fixed)

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