Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Aug 2011 at 12:50 UTC
Updated:
4 Jan 2014 at 01:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pwolanin commentedtagging as Novice, since this is a really easy patch.
All core implenetations need to be checked, but upload_nodeapi(), trigger_nodeapi() and path_nodeapi() clearly have the problem.
Comment #2
DjebbZ commentedBasically I fixed all implementations of hook_nodeapi in core (more than 3 !). (My first core patch)
Comment #3
DjebbZ commentedSorry
Comment #4
pwolanin commentedI think this needs work - some of the changes add a 4th param (not needed) or change the name of the 3rd param:
I think we don't need the change above at all. The main thing is to make sure that any 3rd or 4th params defined are optional (have a default value).
For example, I would change path_nodeapi() to:
Comment #5
DjebbZ commentedWhat about statistics module ? third parameter is 0, not NULL. Same for taxonomy.
function statistics_nodeapi(&$node, $op, $arg = 0) {Comment #6
pwolanin commentedI think it's fine for them to be 0 instead of NULL at this point - as long as there is a default value, it's optional.
Comment #7
DjebbZ commentedSorry again.
Comment #8
DjebbZ commentedOk I understant. Cool.
Comment #9
pwolanin commentedok, so the modified modules are:
modules/book/book.module
modules/forum/forum.module
modules/path/path.module
modules/translation/translation.module
modules/trigger/trigger.module
modules/upload/upload.module
Applied this patch, enabled all those module and did some basic functional tests. Didn't see (or expect) any errors.
Patch also looks good - minimal change to comply with the API and make 3rd and 4th params optional.
Comment #10
DjebbZ commentedSo basically, i wrote my first patch for core :) /me is happy :)
I'll continue with core issues tagged "Novice", they fit me well.
Comment #11
gateway69 commentedIm also seeing this issue, im curious if I should apply the patch here..
Warning: Missing argument 4 for views_attach_nodeapi(), called in /var/www/html/content/sites/all/modules/apachesolr/apachesolr.index.inc on line 63 and defined in views_attach_nodeapi() (line 86 of /var/www/html/content/sites/all/modules/views_attach/views_attach.module).Comment #12
pwolanin commented@gateway69 - no, it looks to be a corresponding bug in the views_attach module. Please file the bug there.
Comment #13
gábor hojtsyOk, reviewed, looks simple and straightforward. Committed. Thanks.
Comment #14
DjebbZ commented/me very happy :) First patch to core :)