Now, when a create issue page is opened, the following error occurs:
Object of class Project could not be converted to string
/models/Project.php, getUserOptions():
/**
* @return array of valid users for this project, indexed by user IDs
*/
public function getUserOptions()
{
$usersArray = CHtml::listData($this->users, 'id', 'username');
return $usersArray;
}
This problem occurs due to your getUserOptions method. This returns object… So you have to pass this in CHtml::listData method. So it convert into an array that dropDown arguments.
I had no problems with this, but as soon as I changed the code in the second line from IssueController / actionCreate method to:
$model->project_id = $this->_project;
I immediately got the error mentioned at the start of this post.
After having had problems with copying code from the Kindle reader of the book (Kindle for PC) to my editor, I started using the code of the book which can be downloaded as the book tells you.
I can nicely put the relevant downloaded file and my own file side by side in the editor and copy the required sections over to my own file.