I tried to include the following in Global PHP field:

if(!isset($_GET['tfa_next'])) {
echo file_get_contents(”http://app.formassembly.com/rest/forms/view/INSERT_FORM_ID_HERE”);
} else {
echo file_get_contents(”http://app.formassembly.com/rest”.$_GET['tfa_next']);
}

I get an error message that pops up that says:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path:
/xxx/admin/structure/views/view/landing_page_form/preview/landing_page_form_block/ajax
StatusText:OK
ResponseTEXT:
Parse error: syntax error, unexpected ':' in
/home/xxx/public_html/sites/all/modules/views_php/plugins/views/views_php_handler_field.inc(131) : runtime-created function on line 2
Fatal error: Function name must be a string in /home/xxx/public_html/sites/all/modules/views_php/plugins/views/views_php_handler_field.inc on line 138

Comments

sabotagenl’s picture

Yes. I got the same error:

Parse error: syntax error, unexpected '<' in /home/xx/html/sites/all/modules/views_php-7.x-1.x-dev/views_php/plugins/views/views_php_handler_field.inc(131) : runtime-created function on line 1

Fatal error: Function name must be a string in /home/xx/html/sites/all/modules/views_php-7.x-1.x-dev/views_php/plugins/views/views_php_handler_field.inc on line 138

Very strange and annoying, since i've been using this module for a while without any errors :(

fourmi4x’s picture

Issue summary: View changes

I had this error when I tried put "" and "" in the "Value code" field, when it should not.

Liam Morland’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.