From fec58f4e298fe23404ddfecb4a684e2a8cb3e26e Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Tue, 10 Dec 2013 09:25:01 -0500 Subject: [PATCH] Fixes #1472: set event sender if possible. --- framework/yii/base/Event.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/yii/base/Event.php b/framework/yii/base/Event.php index a678c89..974a1a4 100644 --- a/framework/yii/base/Event.php +++ b/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, '\\');