From f9a92b82df44475af381bbbdfe5a03d2b1871535 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 31 Oct 2013 00:48:37 +0400 Subject: [PATCH] fixed typo --- docs/guide/upgrade-from-v1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/upgrade-from-v1.md b/docs/guide/upgrade-from-v1.md index 4ccd726..2bf080a 100644 --- a/docs/guide/upgrade-from-v1.md +++ b/docs/guide/upgrade-from-v1.md @@ -109,7 +109,7 @@ Yii::$app->trigger($eventName); If you need to handle all instances of a class instead of the object you can attach a handler like the following: ```php -Event::on([ActiveRecord::className, ActiveRecord::EVENT_AFTER_INSERT], function ($event) { +Event::on([ActiveRecord::className(), ActiveRecord::EVENT_AFTER_INSERT], function ($event) { Yii::trace(get_class($event->sender) . ' is inserted.'); }); ```