From: SourceForge.net <no...@so...> - 2012-04-16 00:12:44
|
Bugs item #3518291, was opened at 2012-04-15 17:12 Message generated for change (Comment added) made by beckmi You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=430840&aid=3518291&group_id=41586 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core - Core Group: XOOPS 2.5.x >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Michael Beck (beckmi) Assigned to: Michael Beck (beckmi) Summary: Fix of variables assigned by reference in formelementtray Initial Comment: Liaise and xForm used: $t =& new XoopsFormCheckBox( $t =& new XoopsFormRadio( which is deprecated in PHP 5.3 (passing of objects by reference) After correcting it, the multiple checkboxes and radio selections showed the same (last) selection. This was caused by the function addelement in formelementtray.php: function addElement( &$formElement, $required = false ) { $this->_elements[] = &$formElement; if ( !$formElement->isContainer() ) { if ( $required ) { $formElement->_required = true; $this->_required[] = &$formElement; } } else { $required_elements = &$formElement->getRequired(); $count = count( $required_elements ); for ( $i = 0 ; $i < $count; $i++ ) { $this->_required[] = &$required_elements[$i]; } } } After removing the ampersand from &$formElement so it is not assigned by reference anymore, it is working now correctly ---------------------------------------------------------------------- Comment By: Michael Beck (beckmi) Date: 2012-04-15 17:12 Message: Fixed in SVN and waiting for review ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=430840&aid=3518291&group_id=41586 |