The way you are loading each node in is creating a huge static array of cached node objects. This eventually gets full and kills the module from processing any further.

You need to change your node_load() so that it resets the internal function cache on every call. Use:
$node = node_load($val['nid'], NULL, TRUE);

I noticed this in 5.x version, but your code hasn't changed in the 6.x version from checking CVS.

Hope it helps.

Comments

btopro’s picture

interesting... I'm not near my CVS stack at the moment but I'll try to fix this soon, thanks for the tip. D6 branch was screwed up which was why you saw that.