Navigation Menu

Skip to content

Commit

Permalink
Ensure $Discussion is passed by reference
Browse files Browse the repository at this point in the history
`$Discussion ` is not passed by reference all the way through the calls beginning from the `getWhere()` method; the discussion data cannot be modified from the `SetCalculatedFields` event when the `getWhere()` method is used when it should be able to.
  • Loading branch information
austins committed Dec 26, 2015
1 parent b7d3837 commit 9dc6b2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion applications/vanilla/models/class.discussionmodel.php
Expand Up @@ -736,7 +736,7 @@ public function calculate(&$Discussion) {
$Discussion->LastDate = $Discussion->DateInserted;
}

$this->EventArguments['Discussion'] = $Discussion;
$this->EventArguments['Discussion'] = &$Discussion;
$this->fireEvent('SetCalculatedFields');
}

Expand Down

0 comments on commit 9dc6b2b

Please sign in to comment.