This looks to be the same or similar issue as #452384: Make Views compatible with PHP 5.3 (but don't break it for PHP 4.x), however this effects the D7 version, the same fix seems to work though.

admin.inc

 function views_ui_ajax_form($js, $key, $view, $display_id = '') {
   ...
   $top[0] = $js;
+  $stepview = $top[2]; // Change view into a reference
+  $top[2] = &$stepview;
   $form_state = call_user_func_array('views_ui_build_form_state', $top);
   ...
 }
Files: 
CommentFileSizeAuthor
#5 views-2810431-5.patch578 bytesMustangGB

Comments

MustangGB created an issue. See original summary.

Jigar.addweb’s picture

Issue tags: +views
MustangGB’s picture

Issue tags: -views
Jigar.addweb’s picture

Issue tags: +Ajax
MustangGB’s picture

Status: Active » Needs review
Issue tags: -Ajax
FileSize
578 bytes

And a patch.

Jigar.addweb’s picture

Issue tags: +PHP 5.3
MustangGB’s picture

Issue tags: -PHP 5.3
Anybody’s picture

Issue tags: +PHP 7

I'm having the same problem in PHP 7 now...

"Parameter 3 to views_ui_build_form_state() expected to be a reference, value given in views_ui_ajax_form"

The backtrace shows that parameter 3 is the view object... I have no explanation currently... can someone confirm the PHP7 issue?

MustangGB’s picture

I first got this after moving to php7, so yea, it's probably the extra checking php7 does.

Feel free to review the patch.
:)

brad.bulger’s picture

Status: Needs review » Reviewed & tested by the community

The Better Exposed Filters test class BEF_TestDatepicker gets this error. Applying the patch from #5 solves it.

Anybody’s picture

Confirming RTBC. Could this be part of the next views release? I think PHP 7 is quite important :)