File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change 12
12
use In2code \Powermail \Utility \BackendUtility ;
13
13
use In2code \Powermail \Utility \DatabaseUtility ;
14
14
use TYPO3 \CMS \Backend \Utility \BackendUtility as BackendUtilityCore ;
15
+ use TYPO3 \CMS \Core \Utility \ArrayUtility ;
15
16
use TYPO3 \CMS \Core \Utility \GeneralUtility ;
16
17
17
18
/**
@@ -66,15 +67,17 @@ public function __construct()
66
67
*/
67
68
public function getForms (array &$ params ): void
68
69
{
69
- $ params ['items ' ] = [];
70
- $ language = (int )$ params ['flexParentDatabaseRow ' ]['sys_language_uid ' ];
71
- foreach ($ this ->getStartPids () as $ startPid ) {
72
- foreach ($ this ->getAllForms ((int )$ startPid , $ language ) as $ form ) {
73
- if ($ this ->hasUserAccessToPage ((int )$ form ['pid ' ])) {
74
- $ params ['items ' ][] = [
75
- BackendUtilityCore::getRecordTitle (Form::TABLE_NAME , $ form ),
76
- (int )$ form ['uid ' ],
77
- ];
70
+ if (ArrayUtility::isValidPath ($ params , 'flexParentDatabaseRow/sys_language_uid ' )) {
71
+ $ params ['items ' ] = [];
72
+ $ language = (int )$ params ['flexParentDatabaseRow ' ]['sys_language_uid ' ];
73
+ foreach ($ this ->getStartPids () as $ startPid ) {
74
+ foreach ($ this ->getAllForms ((int )$ startPid , $ language ) as $ form ) {
75
+ if ($ this ->hasUserAccessToPage ((int )$ form ['pid ' ])) {
76
+ $ params ['items ' ][] = [
77
+ BackendUtilityCore::getRecordTitle (Form::TABLE_NAME , $ form ),
78
+ (int )$ form ['uid ' ],
79
+ ];
80
+ }
78
81
}
79
82
}
80
83
}
You can’t perform that action at this time.
0 commit comments