Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

A little bit better solution #1

Merged
merged 2 commits into from

2 participants

@Hackwar

Since this code is identical in both cases, we can merge this into this one case after the if-clause.

@nextend
Owner

You are right! I needed a fast solution and I haven't checked for duplicated codes, thanks!

@Hackwar

When you click on merge here, this change automatically gets added to your pull request and that one can be handled in the joomla project. ;-)

@nextend nextend merged commit 9926c27 into nextend:patch-1
@nextend
Owner

done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 2, 2014
  1. @Hackwar

    A little bit better solution

    Hackwar authored
  2. @Hackwar

    Removing unnecessary line

    Hackwar authored
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 4 deletions.
  1. +2 −4 libraries/joomla/event/dispatcher.php
View
6 libraries/joomla/event/dispatcher.php
@@ -203,8 +203,6 @@ public function attach($observer)
}
}
- $this->_observers[] = $observer;
- end($this->_observers);
$methods = array($observer['event']);
}
else
@@ -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)
Something went wrong with that request. Please try again.