summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
authorNeil Drumm <drumm@3064.no-reply.drupal.org>2006-11-07 06:24:08 +0000
committerNeil Drumm <drumm@3064.no-reply.drupal.org>2006-11-07 06:24:08 +0000
commita0deec8c454ff58014f44b0e5dafde61322035df (patch)
tree98fa287dca0664717bea20c196319e41b9584cd4 /modules/node/node.module
parent7459a335c34d35e72f18edff7d24b9fa4f9f211c (diff)
downloadbrdo-a0deec8c454ff58014f44b0e5dafde61322035df.tar.gz
brdo-a0deec8c454ff58014f44b0e5dafde61322035df.tar.bz2
#86842 by pwolanin. Clone nodes to keep the cache sanitized.
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 087ff7f01..02840c7a6 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -470,7 +470,7 @@ function node_load($param = array(), $revision = NULL, $reset = NULL) {
if (is_numeric($param)) {
$cachable = $revision == NULL;
if ($cachable && isset($nodes[$param])) {
- return $nodes[$param];
+ return drupal_clone($nodes[$param]);
}
$cond = 'n.nid = %d';
$arguments[] = $param;
@@ -511,7 +511,7 @@ function node_load($param = array(), $revision = NULL, $reset = NULL) {
}
if ($cachable) {
- $nodes[$param] = $node;
+ $nodes[$param] = drupal_clone($node);
}
return $node;