Skip to content

Commit

Permalink
no need to pass objects by reference
Browse files Browse the repository at this point in the history
fixes passing null to event hook registration
  • Loading branch information
splitbrain committed Apr 17, 2012
1 parent 4993701 commit 3ab58ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/events.php
Expand Up @@ -149,8 +149,8 @@ function Doku_Event_Handler() {
* @param $method (function) event handler function
* @param $param (mixed) data passed to the event handler
*/
function register_hook($event, $advise, &$obj, $method, $param=null) {
$this->_hooks[$event.'_'.$advise][] = array(&$obj, $method, $param);
function register_hook($event, $advise, $obj, $method, $param=null) {
$this->_hooks[$event.'_'.$advise][] = array($obj, $method, $param);
}

function process_event(&$event,$advise='') {
Expand Down

0 comments on commit 3ab58ff

Please sign in to comment.