From 6057a0f7fd0254ff992dabed1b3aab6b7615e1fe Mon Sep 17 00:00:00 2001 From: mattab <matthieu.aubry@gmail.com> Date: Fri, 29 Jan 2016 16:22:21 +1300 Subject: [PATCH] Fix error detected in UI tests "using $this when not in object context " --- plugins/CustomVariables/Reports/GetCustomVariables.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/CustomVariables/Reports/GetCustomVariables.php b/plugins/CustomVariables/Reports/GetCustomVariables.php index 275acb25ef..b19b5ba7c6 100644 --- a/plugins/CustomVariables/Reports/GetCustomVariables.php +++ b/plugins/CustomVariables/Reports/GetCustomVariables.php @@ -36,9 +36,10 @@ class GetCustomVariables extends Base $view->requestConfig->filter_sort_column = 'nb_actions'; $view->requestConfig->filter_sort_order = 'desc'; - $view->config->filters[] = function (DataTable $table) use ($view) { + $that = $this; + $view->config->filters[] = function (DataTable $table) use ($view, $that) { if($this->isReportContainsUnsetVisitsColumns($table)) { - $message = $this->getFooterMessageExplanationMissingMetrics(); + $message = $that->getFooterMessageExplanationMissingMetrics(); $view->config->show_footer_message = $message; } }; -- GitLab