diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-31 14:51:04 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-31 14:51:04 +0000 |
commit | 93b4e1c41d20b7a6c729354dbebd99b00bcbe0c2 (patch) | |
tree | 134c1a28d9952328bcd2e090ae8e2c285eea4fea /modules | |
parent | af16eb8007e9eba20c3cf4d08923a3f6a9d41bd5 (diff) | |
download | brdo-93b4e1c41d20b7a6c729354dbebd99b00bcbe0c2.tar.gz brdo-93b4e1c41d20b7a6c729354dbebd99b00bcbe0c2.tar.bz2 |
#203846 by pwolanin and jvandyk: PHP 4 does not allow omitting an object when it is passed by reference, so we need to live with dummy object passing with actions for object-less actions to support PHP 4
Diffstat (limited to 'modules')
-rw-r--r-- | modules/trigger/trigger.module | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/trigger/trigger.module b/modules/trigger/trigger.module index 283f9a148..c14fb8e9c 100644 --- a/modules/trigger/trigger.module +++ b/modules/trigger/trigger.module @@ -206,7 +206,7 @@ function _trigger_normalize_node_context($type, $node) { /** * Implementation of hook_nodeapi(). */ -function trigger_nodeapi($node, $op, $a3, $a4) { +function trigger_nodeapi(&$node, $op, $a3, $a4) { // Keep objects for reuse so that changes actions make to objects can persist. static $objects; // Prevent recursion by tracking which operations have already been called. @@ -299,7 +299,8 @@ function trigger_comment($a1, $op) { actions_do($aid, $objects[$action_info['type']], $context); } else { - actions_do($aid, (object) $a1, $context); + $comment = (object) $a1; + actions_do($aid, $comment, $context); } } } @@ -392,7 +393,8 @@ function trigger_taxonomy($op, $type, $array) { 'op' => $op ); foreach ($aids as $aid => $action_info) { - actions_do($aid, (object) $array, $context); + $taxonomy_object = (object) $array; + actions_do($aid, $taxonomy_object, $context); } } |