diff options
author | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-11-07 06:24:08 +0000 |
---|---|---|
committer | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-11-07 06:24:08 +0000 |
commit | a0deec8c454ff58014f44b0e5dafde61322035df (patch) | |
tree | 98fa287dca0664717bea20c196319e41b9584cd4 | |
parent | 7459a335c34d35e72f18edff7d24b9fa4f9f211c (diff) | |
download | brdo-a0deec8c454ff58014f44b0e5dafde61322035df.tar.gz brdo-a0deec8c454ff58014f44b0e5dafde61322035df.tar.bz2 |
#86842 by pwolanin. Clone nodes to keep the cache sanitized.
-rw-r--r-- | modules/node/node.module | 4 |
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; |