joomla/joomla-platform — pull request #1201 by chdemko (2012-05-10 15:54:18+00:00)
Title: Passing input array by reference

The JInput constructor is not receiving its argument by reference. This is causing unexpected behevior:

JFactory::getApplication()->input->set('foo', 'bar');

This will set $_REQUEST['foo'] equal to 'bar' (because of https://github.com/joomla/joomla-platform/blob/staging/libraries/joomla/input/input.php#L89: var is set by ref)

JFactory::getApplication()->input->post->set('foo', 'bar');

This will *not* set $_POST['foo'] equal to 'bar' (because of https://github.com/joomla/joomla-platform/blob/staging/libraries/joomla/input/input.php#L76, arg is not received by ref)