Why $form['#post'] is cloned for each element instead of beeing passed by reference ?
Hi, Is there any reason to a valued affectation of $form['#post'] instead of a reference affectation ? In form.inc, function form_builder, line 892, there is foreach (element_children($form) as $key) { $form[$key]['#post'] = $form['#post']; why not just a $form[$key]['#post'] = &$form['#post']; ? Thx -- Daniel
Daniel Caillibaud wrote:
Hi,
Is there any reason to a valued affectation of $form['#post'] instead of a reference affectation ?
In form.inc, function form_builder, line 892, there is
foreach (element_children($form) as $key) { $form[$key]['#post'] = $form['#post'];
why not just a $form[$key]['#post'] = &$form['#post']; ?
This is better discussed with a support issue ticket for the Drupal project. -- Earnie -- http://progw.com -- http://www.for-my-kids.com
Le 25/03/10 à 10:37, Earnie Boyd <earnie@users.sourceforge.net> a écrit :
Is there any reason to a valued affectation of $form['#post'] instead of a reference affectation ?
This is better discussed with a support issue ticket for the Drupal project.
I'm not so aware of drupal core so I thought there were an obvious reason. Apparently not, so I post an issue (I don't care to be ridiculous, but I don't want to add noise on core issues). -- Daniel
Daniel, I don't think it is noise at all. And do post back here a link to the issue. Shai Gluskin On Thu, Mar 25, 2010 at 10:42 AM, Daniel Caillibaud <ml@lairdutemps.org>wrote:
Le 25/03/10 à 10:37, Earnie Boyd <earnie@users.sourceforge.net> a écrit :
Is there any reason to a valued affectation of $form['#post'] instead of a reference affectation ?
This is better discussed with a support issue ticket for the Drupal project.
I'm not so aware of drupal core so I thought there were an obvious reason. Apparently not, so I post an issue (I don't care to be ridiculous, but I don't want to add noise on core issues).
-- Daniel
Le 25/03/10 à 10:51, Shai Gluskin <shai@content2zero.com> a écrit :
And do post back here a link to the issue.
here is http://drupal.org/node/752832 -- Daniel
participants (3)
-
Daniel Caillibaud -
Earnie Boyd -
Shai Gluskin