From 8d09633bb963d8f126a0df1c53f87da752534f8e Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Sat, 4 Jan 2014 11:48:03 +0100 Subject: [PATCH] allow class level trigger call on Event subclasses e.g. UserEvent::trigger('event', 'class'); should result in a UserEvent to be passed to the handlers instead of a base\Event. --- framework/yii/base/Event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/yii/base/Event.php b/framework/yii/base/Event.php index 4ba8c7d..9845c77 100644 --- a/framework/yii/base/Event.php +++ b/framework/yii/base/Event.php @@ -157,7 +157,7 @@ class Event extends Object return; } if ($event === null) { - $event = new self; + $event = new static; } $event->handled = false; $event->name = $name;