From c787c50266da2f5af2640032a08843b8b2fababd 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Resources/templates/CommonAdmin/ExcelAction/ExcelBuilderAction.php.twig b/Resources/templates/CommonAdmin/ExcelAction/ExcelBuilderAction.php.twig index 49784e9d..9b2695f4 100644 --- a/Resources/templates/CommonAdmin/ExcelAction/ExcelBuilderAction.php.twig +++ b/Resources/templates/CommonAdmin/ExcelAction/ExcelBuilderAction.php.twig @@ -32,6 +32,7 @@ class ExcelController extends \{{ namespace_prefix }}\{{ bundle_name }}\Controll $this->request = $request; if ($key === null) { + $key = ''; // Standard credential check {{ block('security_action') }} } else { @@ -55,7 +56,7 @@ class ExcelController extends \{{ namespace_prefix }}\{{ bundle_name }}\Controll $suffix = Inflector::classify($key); if (!method_exists($this,"createSpreadsheetHeader$suffix")) { // back to defaults - $key = null; + $key = ''; $suffix = ''; } @@ -100,7 +101,7 @@ class ExcelController extends \{{ namespace_prefix }}\{{ bundle_name }}\Controll $suffix = Inflector::classify($key); if (!method_exists($this,"createExcelHeader$suffix")) { // back to defaults - $key = null; + $key = ''; $suffix = ''; }