Index: sites/all/modules/token/token.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/token/token.module,v retrieving revision 1.5.2.10 diff -u -r1.5.2.10 token.module --- sites/all/modules/token/token.module 16 Nov 2007 22:29:40 -0000 1.5.2.10 +++ sites/all/modules/token/token.module 2 Dec 2007 22:26:57 -0000 @@ -216,6 +216,14 @@ $tokens = array(); } + // Ensure we're working on a copy of the object. Because objects are always + // passed by reference in PHP5 and we don't want to be modifying an object + // when retreiving tokens, ensure we're working with a copy of the object + // rather than an original inadvertently passed by reference. + if (isset($object) && is_object($object)) { + $object = (object)(array)$object; + } + // Simple recursion check. This is to avoid content_view()'s potential // for endless looping when a filter uses tokens, which load the content // view, which calls the filter, which uses tokens, which...