Closed (fixed)
Project:
Sports Pickem
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Oct 2010 at 15:06 UTC
Updated:
8 Nov 2010 at 22:50 UTC
Passing a variable by reference via call_user_func is deprecated. I've fixed it, but I've got a mess of other code in there so I can't post a patch right now. However, replacing call_user_func with call_user_func_array on lines 604 and 610 like this:
// Calculate weekly totals using the appropriate scoring engine.
call_user_func_array('get_user_totals_'. $league->scoring_engine['type'], array(&$totals, $row));
}
// If there is a get_user_totals_finalize_* function for this scoring engine, run it.
if ( function_exists('get_user_totals_finalize_'. $league->scoring_engine['type']) ) {
call_user_func_array('get_user_totals_finalize_'. $league->scoring_engine['type'], array(&$totals));
}
And then changing the function definitions so that $totals becomes &$totals makes the warning go away, and the code works fine.
Comments
Comment #1
jvandervort commentedCommitted to dev, thanks.