Due to a wrong condition which is using !empty() typesList=0 is not possible.
Change the condition to check this the correct way.
Resolves: #76141
Releases: master, 7.6
Change-Id: Ieca9bd2a59e42d112c4eb8058bd76da8d73b86ab
Reviewed-on: https://review.typo3.org/48364
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
}
$typesList = '';
- if (!empty($options['typesList'])) {
+ if (isset($options['typesList']) && $options['typesList'] !== '') {
$typesList = $options['typesList'];
}
'ctrl' => array(),
'columns' => array(),
'types' => array(
+ '0' => array(
+ 'showitem' => ''
+ ),
'1' => array(
'showitem' => ''
)
}
}
+ /**
+ * @test
+ */
+ public function tabIsOnlyAddedForTypesThatAreSpecifiedInTypesList()
+ {
+ $this->subject->add('text_extension_a', $this->tables['first'], 'categories', array('typesList' => '0'));
+ $this->subject->applyTcaForPreRegisteredTables();
+ $this->assertSame('', $GLOBALS['TCA'][$this->tables['first']]['types'][1]['showitem']);
+ }
+
/**
* @test
*/