/**
* Détache un étudiant d'un groupe
* @param integer $id ID du RelStudentSemester à modifier
* @param text $rattrapage indique si on est sur un groupe de semester ou de rattrapage
* @param integer $group_id indique le groupe à réafficher à la fin du traitement
* * */
public function actionDetache($id, $rattrapage, $group_id)
{
$rel=RelStudentSemester::model()->findByPk($id);
if($rattrapage == '1') // on est sur un groupe de rattrapage
{
$rel->group_rattrapage = 0;
$rel->save();
}
else // groupe de semestre
{
$rel->group_id = 0;
$rel->save();
}
$this->redirect(array('/groups/view', array("id"=>$group_id)));
} // fin actionDetache
But the redirect didn’t work:
Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/GL1/protected/controllers/RelStudentSemesterController.php:6)
I’ve check the output on line 6 of my controller, it’s just the begin of the file (it contains “<?php”).
check your files if they do not contain UTF-8 BOM header. Not every text editor will show it, but some add few bytes at the beginning of UTF8 coded files such "header"