From ccc49c52a074dfee46ebb09bff4dda21ff9db9d8 Mon Sep 17 00:00:00 2001 From: Jaap Jansma <jaap.jansma@civicoop.org> Date: Mon, 15 Apr 2024 11:38:13 +0200 Subject: [PATCH] Fixed issue with export output and php 8. --- CHANGELOG.md | 1 + CRM/DataprocessorOutputExport/Form/OutputExport.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16e25761..cfedd2cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Version 1.102 (not yet released) +* Fixed issue with export output and php 8. * Fix for deprecated function calls. See #142 * A data processor output now works in Drupal 10 after saving (without clearing the caches). diff --git a/CRM/DataprocessorOutputExport/Form/OutputExport.php b/CRM/DataprocessorOutputExport/Form/OutputExport.php index f9e8e7be..c3ce23f6 100644 --- a/CRM/DataprocessorOutputExport/Form/OutputExport.php +++ b/CRM/DataprocessorOutputExport/Form/OutputExport.php @@ -67,7 +67,7 @@ class CRM_DataprocessorOutputExport_Form_OutputExport extends CRM_Core_Form { $this->dataProcessorClass = $form->getDataProcessorClass(); $this->dataProcessor = $form->getDataProcessor(); $this->idFieldName = $form->getIdFieldName(); - if ($form->getSort()->getCurrentSortID() > 1) { + if ($form->getSort() && $form->getSort()->getCurrentSortID() > 1) { $sortField = $form->getSort()->_vars[$form->getSort()->getCurrentSortID()]; if ($form->getSort()->getCurrentSortDirection() == CRM_Utils_Sort::DESCENDING) { $this->sortDirection = 'DESC'; -- GitLab