From bdff8279371e360d7ec4975eaffd5eb51fcbbab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20de=20la=20Pen=CC=83a?= Date: Wed, 30 Sep 2026 16:29:08 +0100 Subject: [PATCH] fix: do not read item id when floating controls have no item Create screens pass a null item, and PHP 8 warns on $oItem->id while notes attributes are always built. --- admin/views/_components/floating-controls.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/views/_components/floating-controls.php b/admin/views/_components/floating-controls.php index 7cc028de..51b66565 100644 --- a/admin/views/_components/floating-controls.php +++ b/admin/views/_components/floating-controls.php @@ -41,7 +41,7 @@ 'class="' . $sNotesBtnClass . ' js-admin-notes"', $sNotesModel ? 'data-model-name="' . $sNotesModel . '"' : null, $sNotesProvider ? 'data-model-provider="' . $sNotesProvider . '"' : null, - $oItem->id ? 'data-id="' . $oItem->id . '"' : null, + isset($oItem->id) && $oItem->id ? 'data-id="' . $oItem->id . '"' : null, $sNotesBtnShowCount ? 'data-show-count="true"' : null, ]);