Huh? It's been a year and no one has found the error referred to by the message ("Call-time pass-by-reference").
Leave
function options_form(&$form, &$form_state) {
unchanged.
And change this:
parent::options_form(&$form, &$form_state);
to:
parent::options_form($form, $form_state);
and your error should go away.
Briefly (for those who are new to user defined functions, as it relates to this issue)...
Function declaration
A function's arguments are defined in the function's declaration (the line that begins with the function
keyword). They are a list of PHP variables the function expects to receive from the caller (see Function arguments in the PHP manual for more information). The function declaration determines how many arguments are expected, their datatypes, whether they are required or optional, and whether they are passed by reference or not, among other things.
You have surely noticed the $form
and $form_state
variables used in lots of form-api function declarations, sometimes with and sometimes without a preceding &. Each & tells the function that that argument will be passed to it by reference. This means the function does not receive a copy of the variable from the caller (as usual), but a pointer to it.
A function may change the contents of references directly from within the function, while a copy is private to the function and must be return
ed, if the function want its changes to be available to the function that called it (of course, the caller must know what to do with the returned data). Any changes made to reference variables remain after the function ends.
Function execution
When a function is called/executed, the & MUST be omitted, otherwise you get the aforementioned "Call-time pass-by-reference" error. The function declaration determines if it's a reference, not the caller.
parent::options_form
rather than just invoking it. Failing that, install the advanced help module and look under Help -> Views, I think there's a field handler code example in there