Commit 148c67a
committed
[BUGFIX] Fix array access on RecordInterface in ContentPreviewRenderer for TYPO3 v14
In TYPO3 v14, GridColumnItem::getRecord() returns a RecordInterface object
instead of an array. The previous code used array access syntax ($record['bodytext'])
which throws "Cannot use object of type ... as array" when used without the null
coalescing operator.
Fix by detecting RecordInterface and using ->get() for v14+, keeping the original
array access path for TYPO3 v10–v13 compatibility.1 parent 00925d9 commit 148c67a
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| |||
0 commit comments