Commit c0d2f432 authored by yched's avatar yched

#736440 by yched, dhthwy: fix memory leaks on long running migration scripts (e.g. migrate.module)

parent 29d45358
......@@ -5,6 +5,7 @@ CCK 6.x-2.x
- #863226 by KarenS: make sure we have a function that will return inactive instances when other instances of the same field are still active.
- #887742 by yched: fix notices in _content_get_formatter() in some Views
- #736440 by yched, dhthwy: fix memory leaks on long running migration scripts (e.g. migrate.module)
CCK 6.x-2.8
===========
......
......@@ -24,7 +24,10 @@ function token_content_build_modes() {
function content_token_values($type, $object = NULL) {
$tokens = array();
if ($type == 'node') {
$node = $object;
// Let PHP free the $node object when we are done. Working directly on the
// incoming $object causes memory leak issues on long-running scripts such
// as migrations. See http://drupal.org/node/736440.
$node = clone $object;
// Prevent against invalid 'nodes' built by broken 3rd party code.
if (isset($node->type)) {
$type = content_types($node->type);
......
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