Skip to content

Commit 60fecc7

Browse files
committed
Prevent issues with Doctrine Inflector due to null string
1 parent a09b8f9 commit 60fecc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Resources/templates/CommonAdmin/ExcelAction/ExcelBuilderAction.php.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ExcelController extends \{{ namespace_prefix }}\{{ bundle_name }}\Controll
5252
$sheet = $spreadsheet->setActiveSheetIndex(0);
5353
$results = $this->getResults();
5454
55-
$suffix = Inflector::classify($key);
55+
$suffix = Inflector::classify($key === null ? '' : $key);
5656
if (!method_exists($this,"createSpreadsheetHeader$suffix")) {
5757
// back to defaults
5858
$key = null;
@@ -97,7 +97,7 @@ class ExcelController extends \{{ namespace_prefix }}\{{ bundle_name }}\Controll
9797
$sheet = $phpExcelObject->setActiveSheetIndex(0);
9898
$results = $this->getResults();
9999
100-
$suffix = Inflector::classify($key);
100+
$suffix = Inflector::classify($key === null ? '' : $key);
101101
if (!method_exists($this,"createExcelHeader$suffix")) {
102102
// back to defaults
103103
$key = null;

0 commit comments

Comments
 (0)