Skip to content

Commit 97f073f

Browse files
committed
[Form] Fixed by_reference option with explicite cloning
1 parent 819495c commit 97f073f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reference/forms/types/options/by_reference.rst.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Notice that ``setAuthor()`` is not called. The author is modified by reference.
3131
If you set ``by_reference`` to false, submitting looks like this::
3232

3333
$article->setTitle('...');
34-
$author = $article->getAuthor();
34+
$author = (clone) $article->getAuthor();
3535
$author->setName('...');
3636
$author->setEmail('...');
3737
$article->setAuthor($author);

0 commit comments

Comments
 (0)