|
|
@ -552,8 +552,7 @@ class Component extends BaseObject |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
if ($handler === null) { |
|
|
|
if ($handler === null) { |
|
|
|
unset($this->_events[$name]); |
|
|
|
unset($this->_events[$name], $this->_eventWildcards[$name]); |
|
|
|
unset($this->_eventWildcards[$name]); |
|
|
|
|
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -582,7 +581,7 @@ class Component extends BaseObject |
|
|
|
} |
|
|
|
} |
|
|
|
if ($removed) { |
|
|
|
if ($removed) { |
|
|
|
$this->_eventWildcards[$name] = array_values($this->_eventWildcards[$name]); |
|
|
|
$this->_eventWildcards[$name] = array_values($this->_eventWildcards[$name]); |
|
|
|
// remove empty wildcards to save future redundant regex checks : |
|
|
|
// remove empty wildcards to save future redundant regex checks: |
|
|
|
if (empty($this->_eventWildcards[$name])) { |
|
|
|
if (empty($this->_eventWildcards[$name])) { |
|
|
|
unset($this->_eventWildcards[$name]); |
|
|
|
unset($this->_eventWildcards[$name]); |
|
|
|
} |
|
|
|
} |
|
|
|