Skip to content

Commit

Permalink
Merge pull request #1 from Hackwar/patch-10
Browse files Browse the repository at this point in the history
A little bit better solution
  • Loading branch information
nextend committed Mar 3, 2014
2 parents e462d8e + 338c988 commit 9926c27
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libraries/joomla/event/dispatcher.php
Expand Up @@ -203,8 +203,6 @@ public function attach($observer)
}
}

$this->_observers[] = $observer;
end($this->_observers);
$methods = array($observer['event']);
}
else
Expand All @@ -225,11 +223,11 @@ public function attach($observer)
}
}

$this->_observers[] = $observer;
$methods = array_diff(get_class_methods($observer), get_class_methods('JPlugin'));
end($this->_observers);
}

$this->_observers[] = $observer;
end($this->_observers);
$key = key($this->_observers);

foreach ($methods as $method)
Expand Down

0 comments on commit 9926c27

Please sign in to comment.