Commit a0deec8c authored by drumm's avatar drumm
Browse files

#86842 by pwolanin. Clone nodes to keep the cache sanitized.

parent 7459a335
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment