From 2221e2df72e3ec2ee593868408a685e635e1dca6 Mon Sep 17 00:00:00 2001 From: Bob Vincent Date: Sat, 13 Oct 2012 08:38:43 -0400 Subject: [PATCH 2/2] Issue #1811820: Do not call node_tag_new() on nonexistent nodes. --- ajax/authcache.php | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/ajax/authcache.php b/ajax/authcache.php index 853e0ba..d138308 100644 --- a/ajax/authcache.php +++ b/ajax/authcache.php @@ -134,8 +134,13 @@ function _authcache_form_token_id($vars) { function _authcache_node_history($nid) { include_once './modules/node/node.module'; + // Do not tag nonexistent nodes. + if (empty($node = node_load($nid))) { + return; + } + // Update the 'last viewed' timestamp of the specified node for current user. - node_tag_new($nid); + node_tag_new($node); // Retrieves the timestamp at which the current user last viewed the specified node return node_last_viewed($nid); -- 1.7.1