Commit a6f21085 authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Prevent PHP warning in OpendocsToolbarItem

In case a record from a no longer existing
table is stored as recently opened in the
user session, a PHP warning is triggered
whenever the toolbar items are updated
(e.g. because user opens another record).

This is fixed by adding corresponding fallbacks.

Resolves: #96075
Releases: master, 11.5
Change-Id: Ia99371711f2a8ef9fa6a96844476148674b5b843

Tested-by: core-ci's avatarcore-ci <>
Tested-by: Christian Kuhn's avatarChristian Kuhn <>
Tested-by: Nikita Hovratov's avatarNikita Hovratov <>
Tested-by: Stefan Bürk's avatarStefan Bürk <>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <>
Reviewed-by: Oliver Klee's avatarOliver Klee <>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <>
Reviewed-by: Nikita Hovratov's avatarNikita Hovratov <>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <>
parent 92a150d6
......@@ -161,8 +161,8 @@ class OpendocsToolbarItem implements ToolbarItemInterface
protected function getMenuEntry(array $document, string $identifier): array
$table = $document[3]['table'];
$uid = $document[3]['uid'];
$table = $document[3]['table'] ?? '';
$uid = $document[3]['uid'] ?? 0;
$record = BackendUtility::getRecordWSOL($table, $uid);
if (!is_array($record)) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment