from list_milestones.inc.php line 296
$buffer.= wiki2html($task->description, $task->project);
Here
$task->project is 1908. After calling
wiki2html()...
from render_wiki.inc.php line 1760
function &wiki2html(&$text, &$project=NULL, $item_id=NULL, $field_name=NULL)
{
...
### convert, if id is given ###
if(!is_object($project)) {
$project= Project::getVisibleById($project);
}
$task->project is now the
Project-Object! Although passing the parameter by reference might be a little bit too much optimization, I really think this is a weird behavior... This actually boils down to never ever pass parameters by reference, unless you are really sure what you are doing...
Changing the function definition to ...
function &wiki2html(&$text, $project=NULL, $item_id=NULL, $field_name=NULL)
fixes the bug. I probably will revert all referenced parameters in all Streber code. Just found another reason why php sucks, although I am note sure I can blame it for this behavior. (But this bug would not have happened in python...)