--- modules/node/node.module.orig	2010-08-06 07:41:13.000000000 -0400
+++ modules/node/node.module	2011-01-03 20:09:27.902285784 -0500
@@ -1235,7 +1235,7 @@
         // c.last_comment_timestamp may be NULL. Since both MAX(anynumber, NULL) and
         // GREATEST(anynumber, NULL) return NULL, we OR MAX(c.last_comment_timestamp) with 1
         // to prevent it from being NULL.
-        $ranking[] = '%d * POW(2, (GREATEST(MAX(n.created), MAX(n.changed), MAX(c.last_comment_timestamp) || 1) - %d) * 6.43e-8)';
+        $ranking[] = '%d * POW(2, (GREATEST(MAX(n.created), MAX(n.changed), COALESCE(MAX(c.last_comment_timestamp), 1)) - %d) * 6.43e-8)';
         $arguments2[] = $weight;
         $arguments2[] = (int)variable_get('node_cron_last', 0);
         $join2 .= ' LEFT JOIN {node_comment_statistics} c ON c.nid = i.sid';
