Note: this seems to be specific to PHP 5.6.

Steps to reproduce:

  1. Create a new content view with aggregation enabled and save it.
  2. Add a new display and don't save the view.
  3. Try to add a field to the new display.

During step 3, after selecting the "Aggregation type" and clicking "Apply and continue", an AJAX error will be displayed stating:

Fatal error: [] operator not supported for strings in modules/views/includes/admin.inc on line 2399

Watchdog also records a bunch of PHP warnings and notices starting with:

Warning: Parameter 3 to views_ui_build_form_state() expected to be a reference, value given in views_ui_ajax_form() (line 2949 of modules/views/includes/admin.inc

The problem therefore seems to stem from the call_user_func_array() on line 2949 not passing the $view object by reference to views_ui_build_form_state(). This only seems to be a problem with PHP 5.6; it works fine on 5.5 and 5.4.

Comments

morbiD created an issue. See original summary.

torgosPizza’s picture

Ran into this too. What's the best way to fix? Is it simple enough to pass the variable as a reference instead?

g33kg1rl’s picture

I receive this error when trying add a new taxonomy filter on a view with aggregation. Any ideas?

spgd01’s picture

I have exact same issue as #3

SKAUGHT’s picture

issue also occurs in php7

in my case we were adding a term reference field.
only had Fatal error: [] operator not supported for strings in modules/views/includes/admin.inc on line 2399

SKAUGHT’s picture

Priority: Normal » Major

IMO: major. this stops anyone from being able to build a View.

short term work around: turn of javascript on your browser and build your view.