commit 3e1079b25d715a3f3a602fff03aaf0ec84c90bed (HEAD -> 7.x-1.x) Author: Liam Morland Date: Thu May 14 16:33:05 2020 -0400 Fixes to #174 diff --git a/plugins/views/views_php_handler_field.inc b/plugins/views/views_php_handler_field.inc index b7c7cc7..9c77432 100644 --- a/plugins/views/views_php_handler_field.inc +++ b/plugins/views/views_php_handler_field.inc @@ -220,7 +220,7 @@ class views_php_handler_field extends views_handler_field { $code = ' ?>' . $this->options['php_output']; $function = function($view, $handler, &$static, $row, $data, $value) use ($code) { - eval('?>' . $code); + eval($code); }; ob_start(); $function($this->view, $this, $this->php_static_variable, $normalized_row, $values, isset($values->{$this->field_alias}) ? $values->{$this->field_alias} : NULL); diff --git a/plugins/views/views_php_handler_filter.inc b/plugins/views/views_php_handler_filter.inc index d957eca..797d92b 100644 --- a/plugins/views/views_php_handler_filter.inc +++ b/plugins/views/views_php_handler_filter.inc @@ -65,7 +65,7 @@ class views_php_handler_filter extends views_handler_filter { function php_pre_execute() { // Ecexute static PHP code. if (!empty($this->options['php_setup'])) { - $code = $this->options['php_output'] . ';'; + $code = $this->options['php_setup'] . ';'; $function = function($view, $handler, &$static) use ($code) { eval($code); };