Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d275302

Browse filesBrowse files
committed
bug #3541 Update generic_event.rst (Lumbendil)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #3541). Discussion ---------- Update generic_event.rst The $event['data'] field was not set, thus it wouldn't be modified. Also, the example already had a lowercase string. Uppercased 1 letter. Commits ------- 029f4e1 Update generic_event.rst
2 parents 73adf8b + b8e1e99 commit d275302
Copy full SHA for d275302

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎components/event_dispatcher/generic_event.rst

Copy file name to clipboardExpand all lines: components/event_dispatcher/generic_event.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Filtering data::
9393

9494
use Symfony\Component\EventDispatcher\GenericEvent;
9595

96-
$event = new GenericEvent($subject, array('data' => 'foo'));
96+
$event = new GenericEvent($subject, array('data' => 'Foo'));
9797
$dispatcher->dispatch('foo', $event);
9898

9999
echo $event['data'];
@@ -102,6 +102,6 @@ Filtering data::
102102
{
103103
public function filter(GenericEvent $event)
104104
{
105-
strtolower($event['data']);
105+
$event['data'] = strtolower($event['data']);
106106
}
107107
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.