Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
taxonomy.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Sep 2007 at 15:41 UTC
Updated:
9 Oct 2007 at 14:52 UTC
Jump to comment: Most recent file
Comments
Comment #1
stella commentedI also get the following warnings when I use the taxonomy_term_count_nodes() function:
Cheers,
Stella
Comment #2
xqus commentedThis patch should fix the errors in node.module.
Comment #3
pwolanin commentedlooks like a start - but is taxonomy module making the call with the wrong params?
Comment #4
pwolanin commentedhere's a more thorough patch - solves the root problem in taxonomy module (the LET JOIN may return a NULL for type), but also adds a check to node module similar to the patch above.
Comment #5
pwolanin commentedcorrect doxygen for node_get_types() - it's already the case that FALSE may be the return value.
Comment #6
kkaefer commentedChanges look sane and fix the problem.
Comment #7
gábor hojtsyThanks, committed!
Comment #8
stella commentedWell the patch from comment #5 fixed all the warning issues I had with the category admin page (admin/content/taxonomy) and fixed the warnings on the faq page which calls the taxonomy_term_count_nodes() function. However, I now get the following warning for the taxonomy module on the faq page, again when using taxonomy_term_count_nodes():
Cheers,
Stella
Comment #9
pwolanin commentedPlease open a new issue and post a link here if you think there is an additional/different bug.
Comment #10
stella commentedNo, it's the same issue.
line 784 in the taxonomy.module before the patch was:
After the patch, this is now line 791. So basically I'm now getting the same error as in comment #1 for the same line, except the line number has changed. Sorry, I should have been clearer on this. I should have said that one of the warnings in comment #1 was fixed, but the other wasn't.
Cheers,
Stella
Comment #11
pwolanin commentedI'm not sure what the "faq" module is.
However, looking at the code it's pretty obvious that the value being returned may not set. Try the attached patch.
Comment #12
pwolanin commentedactually that patch isn't good enough - here's one that should be more correct and general.
Comment #13
stella commentedThe patch from comment #12 fixed the warnings for me. Thanks!
Cheers,
Stella
Comment #14
pwolanin commentedok - since this is a trivial and obvious change I won't feel bad marking it RTBC.
Comment #15
gábor hojtsyOK, thanks, committed.
Comment #16
(not verified) commented