$_POST vs. 'post'
Posted: Thu Mar 13, 2008 12:55 pm
Hi,
In a component I created, depending on the system, visitors will get errors from this:
$this->assignRef( 'name', JRequest::getVar( 'name','', 'post', 'string') );
but not from this:
$this->assignRef( 'name', JRequest::getVar( 'name','', $_POST, 'string') );
The error is from PHP:
*Fatal error*: Only variables can be passed by reference in ... [filename]
Any ideas why this happens and what the difference is?
In a component I created, depending on the system, visitors will get errors from this:
$this->assignRef( 'name', JRequest::getVar( 'name','', 'post', 'string') );
but not from this:
$this->assignRef( 'name', JRequest::getVar( 'name','', $_POST, 'string') );
The error is from PHP:
*Fatal error*: Only variables can be passed by reference in ... [filename]
Any ideas why this happens and what the difference is?