From 60fecc753e08b7fbdd981b0c20a87d136f3b98ab Mon Sep 17 00:00:00 2001 From: Tobias Feijten Date: Mon, 22 Jul 2019 11:52:58 +0200 Subject: [PATCH] Prevent issues with Doctrine Inflector due to null string --- .../CommonAdmin/ExcelAction/ExcelBuilderAction.php.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/templates/CommonAdmin/ExcelAction/ExcelBuilderAction.php.twig b/Resources/templates/CommonAdmin/ExcelAction/ExcelBuilderAction.php.twig index 49784e9d..adc6d87d 100644 --- a/Resources/templates/CommonAdmin/ExcelAction/ExcelBuilderAction.php.twig +++ b/Resources/templates/CommonAdmin/ExcelAction/ExcelBuilderAction.php.twig @@ -52,7 +52,7 @@ class ExcelController extends \{{ namespace_prefix }}\{{ bundle_name }}\Controll $sheet = $spreadsheet->setActiveSheetIndex(0); $results = $this->getResults(); - $suffix = Inflector::classify($key); + $suffix = Inflector::classify($key === null ? '' : $key); if (!method_exists($this,"createSpreadsheetHeader$suffix")) { // back to defaults $key = null; @@ -97,7 +97,7 @@ class ExcelController extends \{{ namespace_prefix }}\{{ bundle_name }}\Controll $sheet = $phpExcelObject->setActiveSheetIndex(0); $results = $this->getResults(); - $suffix = Inflector::classify($key); + $suffix = Inflector::classify($key === null ? '' : $key); if (!method_exists($this,"createExcelHeader$suffix")) { // back to defaults $key = null;