Browse Source

Fixes #1472: set event sender if possible.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
fec58f4e29
  1. 3
      framework/yii/base/Event.php

3
framework/yii/base/Event.php

@ -161,6 +161,9 @@ class Event extends Object
$event->name = $name;
if (is_object($class)) {
if ($event->sender === null) {
$event->sender = $class;
}
$class = get_class($class);
} else {
$class = ltrim($class, '\\');

Loading…
Cancel
Save