Closed (fixed)
Project:
autocategorise
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Jul 2009 at 21:38 UTC
Updated:
5 Oct 2011 at 13:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
skizzo commentedIf this is the same error reported in http://drupal.org/node/466388 it has been
fixed in HEAD on June 9, but your report indicates that you are using 1.4 (May 15).
Comment #2
drupallogic commentedsorry, what do you mean with "Fixed in HEAD" ?
also I don't see any further development beside 1.4 ?
Comment #3
skizzo commentedI believe it's fixed in the developer repository. I am not familiar with it, but I sometimes
checked releases out of it via cvs commands. See also:
http://drupal.org/node/133304
http://drupal.org/node/320
Comment #4
drupallogic commentedwhy shall I have to look into CVS... I don't understand CVS things.
this module should be updated allready. anyway...
Comment #5
Anonymous (not verified) commentedCould someone post the solution?
Does the module work despite the error?
Comment #6
Anonymous (not verified) commentedI decided to use version 1.3 and its working fine! Love this module.
http://ftp.drupal.org/files/projects/autocategorise-6.x-1.3.tar.gz
Comment #7
szy commentedFixed in HEAD? Looks like HEAD was not commited since
may 2009, so it cannot be fixed there.
But there is no error in DEV version from 2009-Aug-29.
Szy.
Comment #8
agileware commentedIt seems there has been an attempt to fix the problem in 6.x-1.x-dev but it doesn't fix it.
The problem is caused by an uninitialised variable.
Here is a patch against 6.x-1.x-dev that fixes the problem.
Comment #9
mkmckinn commentedI think the problem stems from not testing if the $otherterms array is empty - if it is then Argument 2 ($otherterms) is not an array. By testing for this, I've overcome the problem. Here are the lines I added to the autocategorise.module in 6.x.1.4 from 154 to 158 which seem to have corrected the problem:
if ( empty( $otherterms )) {
} else {
$matches = array_merge($matches, $otherterms);
}
Never contributed code to someone else's Drupal module before so I'm not really sure how to get this included in a "dev" release.
Comment #10
agileware commentedThe patch I already made in #8 fixes this problem.
Array merge doesn't care if you pass it an empty array, only if you pass it something that is not an array.
Seeing as it is good coding practice to initialize variables anyway, that's all that needs to be done.
Comment #11
brycesenz commentedThis is fixed in the latest -dev release.