From bf235030003ae213af7466845be3e2ac6e0c2e72 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 29 Jul 2010 18:41:16 +0800 Subject: [PATCH] Missing field name? --- manual/en/events.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manual/en/events.txt b/manual/en/events.txt index 951ed153d..f08bac819 100644 --- a/manual/en/events.txt +++ b/manual/en/events.txt @@ -387,7 +387,7 @@ A simple example for this event looks like: public function preUpdate(PreUpdateEventArgs $eventArgs) { if ($eventArgs->getEntity() instanceof User) { - if ($eventArgs->hasChangedField('name') && $eventArgs->getNewValue() == 'Alice') { + if ($eventArgs->hasChangedField('name') && $eventArgs->getNewValue('name') == 'Alice') { $eventArgs->setNewValue('name', 'Bob'); } }