0

I can't fix this, when i used this code on php 5.3 this run perfectly; i'm just using the functions of Symfnony and doctrine without references.

$valoresDefecto = array();
foreach($cambios as $cambio) {

     $valoresDefecto[preg_replace("|\s|","-",$cambio->getNombre()."").'-a-'.preg_replace("|\s|","-",$cambio->getAFusionarCon()->getAfusionarCon()->getNombre()."")] = false;
}
$form = $this->createFormBuilder($valoresDefecto);
foreach($cambios as $cambio){       
    $form->add(preg_replace("|\s|","-",$cambio->getNombre()."").'-a-'.preg_replace("|\s|","-",$cambio->getAFusionarCon()->getAfusionarCon()->getNombre().""),'choice',array('choices'=> array($cambio->getAFusionarCon()->getId()."#aceptado"=>"aceptar", $cambio->getAFusionarCon()->getId()."#rechazado"=>"rechazar")));                                         
 }
 $terminado = $form->getForm();
som
  • 4,650
  • 2
  • 21
  • 36
  • 2
    It's very hard to answer this without knowing where (file / line) this error is thrown. Is it in your code or in Symfony's / Doctrine's? If it is the latter, which version of these frameworks are you using? – Ulrich Schmidt-Goertz Aug 02 '13 at 07:37
  • Looks relevant: http://stackoverflow.com/questions/8971261/php-5-4-call-time-pass-by-reference-easy-fix-available I'm not seeing any ampersands in the example code. Perhaps the error is elsewhere? – rutter Aug 02 '13 at 07:42

0 Answers0